PR9903: Recover from a member functon declared with the 'typedef' specifier by
dropping the specifier, just like we do for non-member functions and function
templates declared 'typedef'. Patch by Brian Brooks!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168108 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/cxx-decl.cpp b/test/Parser/cxx-decl.cpp
index 290b947..5a4c9da 100644
--- a/test/Parser/cxx-decl.cpp
+++ b/test/Parser/cxx-decl.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fsyntax-only -triple i386-linux -pedantic %s
+// RUN: %clang_cc1 -verify -fsyntax-only -triple i386-linux -pedantic -fcxx-exceptions -fexceptions %s
const char const *x10; // expected-warning {{duplicate 'const' declaration specifier}}
@@ -124,6 +124,14 @@
// PR4111
void f(sqrgl); // expected-error {{unknown type name 'sqrgl'}}
+// PR9903
+struct S {
+ typedef void a() { }; // expected-error {{function definition declared 'typedef'}}
+ typedef void c() try { } catch(...) { } // expected-error {{function definition declared 'typedef'}}
+ int n, m;
+ typedef S() : n(1), m(2) { } // expected-error {{function definition declared 'typedef'}}
+};
+
// PR8380
extern "" // expected-error {{unknown linkage language}}
test6a { ;// expected-error {{C++ requires a type specifier for all declarations}} \