Fix new check for missing semicolon after struct definition to deal with the
case where the type in the following declaration is specified as a template-id,
and refactor for clarity.
llvm-svn: 195280
diff --git a/clang/test/Parser/recovery.cpp b/clang/test/Parser/recovery.cpp
index b5b0948..60b4b5a 100644
--- a/clang/test/Parser/recovery.cpp
+++ b/clang/test/Parser/recovery.cpp
@@ -119,3 +119,13 @@
struct Inner4 {} // ok, no missing ';' here
Inner5;
}
+
+namespace NS {
+ template<typename T> struct Foo {};
+}
+struct MissingSemiThenTemplate1 {} // expected-error {{expected ';' after struct}}
+NS::Foo<int> missingSemiBeforeFunctionReturningTemplateId1();
+
+using NS::Foo;
+struct MissingSemiThenTemplate2 {} // expected-error {{expected ';' after struct}}
+Foo<int> missingSemiBeforeFunctionReturningTemplateId2();
diff --git a/clang/test/SemaObjCXX/crash.mm b/clang/test/SemaObjCXX/crash.mm
index 345f72e..521b923 100644
--- a/clang/test/SemaObjCXX/crash.mm
+++ b/clang/test/SemaObjCXX/crash.mm
@@ -14,10 +14,10 @@
@implementation Test
struct EvilStruct {
-} // note the missing semicolon
+} // expected-error {{expected ';' after struct}}
- typedef std::pair<int, int> IntegerPair; // expected-error{{typedef declarator cannot be qualified}} \
-// expected-error{{typedef name must be an identifier}} \
-// expected-error{{expected ';' after top level declarator}}
+ typedef std::pair<int, int> IntegerPair;
+
+template<typename...Ts> void f(Ts); // expected-error {{unexpanded}} expected-warning {{extension}}
@end