Debian Codegraph @

gcc/testsuite/g++.dg/overload/error5.C

raw
1 // Verify we note all three candidates when diagnosing overload
2 // resolution failure. The presence of the first two (ambiguous)
3 // non-strictly viable candidates used to make us prune the third
4 // and not note it.
5
6 void f(int, int*); // { dg-message "candidate" }
7 void f(int*, int); // { dg-message "candidate" }
8 void f(int, int, int); // { dg-message "candidate" }
9
10 int main() {
11 f(1, 2); // { dg-error "no match|invalid conversion" }
12 }