diff options
Diffstat (limited to 'test/SemaCXX/member-expr.cpp')
-rw-r--r-- | test/SemaCXX/member-expr.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/SemaCXX/member-expr.cpp b/test/SemaCXX/member-expr.cpp index 68af4152ef4e..981bae7c770b 100644 --- a/test/SemaCXX/member-expr.cpp +++ b/test/SemaCXX/member-expr.cpp @@ -124,10 +124,10 @@ namespace PR9025 { return fun.x; // expected-error{{base of member reference is an overloaded function; perhaps you meant to call it with no arguments?}} } - S fun2(); // expected-note{{possibly valid overload here}} - S fun2(int i); // expected-note{{possibly valid overload here}} + S fun2(); + S fun2(int i); int g2() { - return fun2.x; // expected-error{{base of member reference is an overloaded function; perhaps you meant to call it?}} + return fun2.x; // expected-error{{base of member reference is an overloaded function; perhaps you meant to call it with no arguments?}} } S fun3(int i=0); @@ -140,4 +140,10 @@ namespace PR9025 { int g4() { return fun4.x; // expected-error{{base of member reference is a function; perhaps you meant to call it?}} } + + S fun5(int i); // expected-note{{possibly valid overload here}} + S fun5(float f); // expected-note{{possibly valid overload here}} + int g5() { + return fun5.x; // expected-error{{base of member reference is an overloaded function; perhaps you meant to call it?}} + } } |