summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
committerdim <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
commit554bcb69c2d785a011a30e7db87a36a87fe7db10 (patch)
tree9abb1a658a297776086f4e0dfa6ca533de02104e /test/SemaTemplate/instantiate-exception-spec-cxx11.cpp
parentbb67ca86b31f67faee50bd10c3b036d65751745a (diff)
downloadFreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.zip
FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.tar.gz
Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
Diffstat (limited to 'test/SemaTemplate/instantiate-exception-spec-cxx11.cpp')
-rw-r--r--test/SemaTemplate/instantiate-exception-spec-cxx11.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp b/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp
index 8a6f9ef..c560c6b 100644
--- a/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp
+++ b/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp
@@ -131,3 +131,17 @@ template<typename T> struct Derived : Base {
Derived<Exc1> d1; // ok
Derived<Exc2> d2; // expected-note {{in instantiation of}}
+
+// If the vtable for a derived class is used, the exception specification of
+// any member function which ends up in that vtable is needed, even if it was
+// declared in a base class.
+namespace PR12763 {
+ template<bool *B> struct T {
+ virtual void f() noexcept (*B); // expected-error {{constant expression}} expected-note {{read of non-const}}
+ };
+ bool b; // expected-note {{here}}
+ struct X : public T<&b> {
+ virtual void g();
+ };
+ void X::g() {} // expected-note {{in instantiation of}}
+}
OpenPOWER on IntegriCloud