summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/addr-of-overloaded-function.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-06-04 00:28:46 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-06-04 00:28:46 +0000
commit6df859d85954df08e201fd4506f19b20c37d49e6 (patch)
tree477dec586085df1ffac32c357553ac0acc7085f5 /clang/test/SemaCXX/addr-of-overloaded-function.cpp
parent1710d59553e98d6c0d604a541d9119eb14dc49fc (diff)
downloadbcm5719-llvm-6df859d85954df08e201fd4506f19b20c37d49e6.tar.gz
bcm5719-llvm-6df859d85954df08e201fd4506f19b20c37d49e6.zip
Bound member function diagnostic - suggest no-args calls and note overload candidates
Still missing cases for templates, but this is a step in the right direction. Also omits suggestions that would be ambiguous (eg: void func(int = 0); + void func(float = 0); func;) llvm-svn: 183173
Diffstat (limited to 'clang/test/SemaCXX/addr-of-overloaded-function.cpp')
-rw-r--r--clang/test/SemaCXX/addr-of-overloaded-function.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/test/SemaCXX/addr-of-overloaded-function.cpp b/clang/test/SemaCXX/addr-of-overloaded-function.cpp
index 096f74823a4..95223f0f5e3 100644
--- a/clang/test/SemaCXX/addr-of-overloaded-function.cpp
+++ b/clang/test/SemaCXX/addr-of-overloaded-function.cpp
@@ -57,11 +57,12 @@ struct B
struct C {
C &getC() {
- return makeAC; // expected-error{{reference to non-static member function must be called}}
+ return makeAC; // expected-error-re{{reference to non-static member function must be called$}}
}
- C &makeAC();
- const C &makeAC() const;
+ // FIXME: filter by const so we can unambiguously suggest '()' & point to just the one candidate, probably
+ C &makeAC(); // expected-note{{possible target for call}}
+ const C &makeAC() const; // expected-note{{possible target for call}}
static void f(); // expected-note{{candidate function}}
static void f(int); // expected-note{{candidate function}}
OpenPOWER on IntegriCloud