summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/struct-decl.c
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2014-05-14 07:54:17 +0000
committerJohn McCall <rjmccall@apple.com>2014-05-14 07:54:17 +0000
commit2976f8b011a0845f1b0865150036cf3f48a61cbf (patch)
tree0a0a53e27e82bb4ed2160aa25eba44d3023eb7bb /clang/test/Sema/struct-decl.c
parentadc3ff9f48475903255f05e2d84e7c9ef3409dd6 (diff)
downloadbcm5719-llvm-2976f8b011a0845f1b0865150036cf3f48a61cbf.tar.gz
bcm5719-llvm-2976f8b011a0845f1b0865150036cf3f48a61cbf.zip
Create a redeclaration when an elaborated type specifier
resolves to an existing declaration if there are attributes present. This gives us something to apply the attributes to. llvm-svn: 208756
Diffstat (limited to 'clang/test/Sema/struct-decl.c')
-rw-r--r--clang/test/Sema/struct-decl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Sema/struct-decl.c b/clang/test/Sema/struct-decl.c
index 8d3d74de767..055f14bf4dc 100644
--- a/clang/test/Sema/struct-decl.c
+++ b/clang/test/Sema/struct-decl.c
@@ -66,3 +66,6 @@ void test_hiding() {
struct hiding_1 *p = hiding_1();
struct hiding_2 *q = hiding_2;
}
+
+struct PreserveAttributes {};
+typedef struct __attribute__((noreturn)) PreserveAttributes PreserveAttributes_t; // expected-warning {{'noreturn' attribute only applies to functions and methods}}
OpenPOWER on IntegriCloud