From ddf117e1e4e53e8bcd505afda0c4e68baff086c2 Mon Sep 17 00:00:00 2001
From: Dmitri Gribenko <gribozavr@gmail.com>
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 23ceebad3b3..e19dc866070 100644
--- a/test/CXX/special/class.ctor/p1.cpp
+++ b/test/CXX/special/class.ctor/p1.cpp
@@ -42,6 +42,14 @@ 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 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'}}
+};
+
-- 
GitLab