Clean up some error messages with anonymous structs/unions and member declaration parsing. Fixes PR3680
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66305 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/cxx-using-directive.cpp b/test/Parser/cxx-using-directive.cpp
index b894360..bf89bb1 100644
--- a/test/Parser/cxx-using-directive.cpp
+++ b/test/Parser/cxx-using-directive.cpp
@@ -13,7 +13,7 @@
class C {
- using namespace B ; // expected-error{{expected unqualified-id}}
+ using namespace B ; // expected-error{{expected member name or ';' after declaration specifiers}}
//FIXME: this needs better error message
};
diff --git a/test/Sema/anonymous-struct-union.c b/test/Sema/anonymous-struct-union.c
index d8a445c..9784236 100644
--- a/test/Sema/anonymous-struct-union.c
+++ b/test/Sema/anonymous-struct-union.c
@@ -88,4 +88,11 @@
};
};
+// PR3680
struct {}; // expected-error{{declaration does not declare anything}}
+
+struct s2 {
+ union {
+ int a;
+ }
+}; // expected-error{{expected member name or ';' after declaration specifiers}}