From ddf117e1e4e53e8bcd505afda0c4e68baff086c2 Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Tue, 12 Feb 2013 20:43:41 +0000 Subject: [PATCH] Add a test for r174980, that we used to accept git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175005 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CXX/special/class.ctor/p1.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/CXX/special/class.ctor/p1.cpp b/test/CXX/special/class.ctor/p1.cpp index 23ceebad3b..e19dc86607 100644 --- a/test/CXX/special/class.ctor/p1.cpp +++ b/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'}} +}; + -- 2.40.0