summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/member-pointer.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-27 19:56:05 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-27 19:56:05 +0000
commit1ababa63ded36f8ed6a3e55df8e26d9860ab2867 (patch)
tree05469b2e17dccc2c9b4b4906c472b665ffc42267 /clang/test/SemaCXX/member-pointer.cpp
parent9bad2fb378803b34d911c35175803cf1c88386d6 (diff)
downloadbcm5719-llvm-1ababa63ded36f8ed6a3e55df8e26d9860ab2867.tar.gz
bcm5719-llvm-1ababa63ded36f8ed6a3e55df8e26d9860ab2867.zip
Continue to instantiate sub-statements in a CompoundStmt as long as
we don't see a DeclStmt (failure to instantiate which generally causes panic). llvm-svn: 112282
Diffstat (limited to 'clang/test/SemaCXX/member-pointer.cpp')
-rw-r--r--clang/test/SemaCXX/member-pointer.cpp41
1 files changed, 38 insertions, 3 deletions
diff --git a/clang/test/SemaCXX/member-pointer.cpp b/clang/test/SemaCXX/member-pointer.cpp
index 83823f69c63..795c0b95efd 100644
--- a/clang/test/SemaCXX/member-pointer.cpp
+++ b/clang/test/SemaCXX/member-pointer.cpp
@@ -179,13 +179,11 @@ namespace rdar8358512 {
// We can't call this with an overload set because we're not allowed
// to look into overload sets unless the parameter has some kind of
// function type.
- template <class F> void bind(F f); // expected-note 6 {{candidate template ignored}}
+ template <class F> void bind(F f); // expected-note 12 {{candidate template ignored}}
template <class F, class T> void bindmem(F (T::*f)()); // expected-note 4 {{candidate template ignored}}
template <class F> void bindfn(F (*f)()); // expected-note 4 {{candidate template ignored}}
struct A {
- void member();
-
void nonstat();
void nonstat(int);
@@ -234,4 +232,41 @@ namespace rdar8358512 {
}
};
};
+
+ template <class T> class B {
+ void nonstat();
+ void nonstat(int);
+
+ void mixed();
+ static void mixed(int);
+
+ static void stat();
+ static void stat(int);
+
+ // None of these can be diagnosed yet, because the arguments are
+ // still dependent.
+ void test0a() {
+ bind(&nonstat);
+ bind(&B::nonstat);
+
+ bind(&mixed);
+ bind(&B::mixed);
+
+ bind(&stat);
+ bind(&B::stat);
+ }
+
+ void test0b() {
+ bind(&nonstat); // expected-error {{no matching function for call}}
+ bind(&B::nonstat); // expected-error {{no matching function for call}}
+
+ bind(&mixed); // expected-error {{no matching function for call}}
+ bind(&B::mixed); // expected-error {{no matching function for call}}
+
+ bind(&stat); // expected-error {{no matching function for call}}
+ bind(&B::stat); // expected-error {{no matching function for call}}
+ }
+ };
+
+ template void B<int>::test0b(); // expected-note {{in instantiation}}
}
OpenPOWER on IntegriCloud