From: Dmitri Gribenko Date: Tue, 12 Feb 2013 20:43:41 +0000 (+0000) Subject: Add a test for r174980, that we used to accept X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e472b63280f208edf086c843725ec5935baa93f;p=platform%2Fupstream%2Fllvm.git Add a test for r174980, that we used to accept llvm-svn: 175005 --- diff --git a/clang/test/CXX/special/class.ctor/p1.cpp b/clang/test/CXX/special/class.ctor/p1.cpp index 23ceeba..e19dc86 100644 --- a/clang/test/CXX/special/class.ctor/p1.cpp +++ b/clang/test/CXX/special/class.ctor/p1.cpp @@ -42,6 +42,14 @@ template (X1::X1)(double) { } template X1 X1::f1(int) { return 0; } template X1 (X1::f1)(type) { return 0; } -class A { - A::A(); // expected-error{{extra qualification on member 'A'}} +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'}} +}; +