aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/anonymous-struct-union.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-03-06 23:28:18 +0000
committerDouglas Gregor <dgregor@apple.com>2009-03-06 23:28:18 +0000
commite950d4bbb7c785c7a7abdd0ad98f372b8c7980b8 (patch)
tree83e97413c95bfcae62c8f7524c273822bf9228f0 /test/Sema/anonymous-struct-union.c
parent6d3dee9f9deda0dbe8e71d4228322ed82da70ff7 (diff)
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
Diffstat (limited to 'test/Sema/anonymous-struct-union.c')
-rw-r--r--test/Sema/anonymous-struct-union.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Sema/anonymous-struct-union.c b/test/Sema/anonymous-struct-union.c
index d8a445c649..9784236c8b 100644
--- a/test/Sema/anonymous-struct-union.c
+++ b/test/Sema/anonymous-struct-union.c
@@ -88,4 +88,11 @@ struct s1 {
};
};
+// PR3680
struct {}; // expected-error{{declaration does not declare anything}}
+
+struct s2 {
+ union {
+ int a;
+ }
+}; // expected-error{{expected member name or ';' after declaration specifiers}}