diff options
Diffstat (limited to 'test/CXX/special/class.ctor/p1.cpp')
-rw-r--r-- | test/CXX/special/class.ctor/p1.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/CXX/special/class.ctor/p1.cpp b/test/CXX/special/class.ctor/p1.cpp index 4d82184..e19dc86 100644 --- a/test/CXX/special/class.ctor/p1.cpp +++ b/test/CXX/special/class.ctor/p1.cpp @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -// expected-no-diagnostics + struct X0 { struct type { }; @@ -41,3 +41,15 @@ template<typename T> X1<T>::X1() { } template<typename T> (X1<T>::X1)(double) { } template<typename T> X1<T> X1<T>::f1(int) { return 0; } template<typename T> X1<T> (X1<T>::f1)(type) { return 0; } + +class X2 { + X2::X2(); // expected-error {{extra qualification on member 'X2'}} +}; + +// We used to parse 'X3::X3' as a member function declaration. +// DR 1435 and DR 1310 made this invalid. +typedef int T1; +struct X3 { + X3::X3(T1()); // expected-error {{extra qualification on member 'X3'}} +}; + |