summaryrefslogtreecommitdiffstats
path: root/clang/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
commitaa017377827f4f8226731d1219c29dc25baf0063 (patch)
treecde848c4d8d67cf1a9c137f2dd0ea984bfe8a058 /clang/test/Sema/struct-decl.c
parent6149a341026a985d90c4bb9ac2031f7ab27c8e57 (diff)
downloadbcm5719-llvm-aa017377827f4f8226731d1219c29dc25baf0063.tar.gz
bcm5719-llvm-aa017377827f4f8226731d1219c29dc25baf0063.zip
Warn about unused declaration-specifiers on tag declarations.
llvm-svn: 128118
Diffstat (limited to 'clang/test/Sema/struct-decl.c')
-rw-r--r--clang/test/Sema/struct-decl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Sema/struct-decl.c b/clang/test/Sema/struct-decl.c
index 3639d2479b9..e1c7073e01b 100644
--- a/clang/test/Sema/struct-decl.c
+++ b/clang/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;
+};
OpenPOWER on IntegriCloud