aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/struct-decl.c
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-03-22 23:00:04 +0000
committerJohn McCall <rjmccall@apple.com>2011-03-22 23:00:04 +0000
commitac4df2454d5462c3bf5f369d65c3ad651100fa40 (patch)
tree014079e4ba51aea3cadf9f1cce8b34e42c265385 /test/Sema/struct-decl.c
parentd9c3fa30bc6914c12b025073d2779a3ddb8f4787 (diff)
Warn about unused declaration-specifiers on tag declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128118 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/struct-decl.c')
-rw-r--r--test/Sema/struct-decl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Sema/struct-decl.c b/test/Sema/struct-decl.c
index 3639d2479b..e1c7073e01 100644
--- a/test/Sema/struct-decl.c
+++ b/test/Sema/struct-decl.c
@@ -46,3 +46,14 @@ struct s0 f0(void) {}
struct x0 {
unsigned int x1;
};
+
+// rdar://problem/9150338
+static struct test1 { // expected-warning {{'static' ignored on this declaration}}
+ int x;
+};
+const struct test2 { // expected-warning {{'const' ignored on this declaration}}
+ int x;
+};
+inline struct test3 { // expected-warning {{'inline' ignored on this declaration}}
+ int x;
+};