summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/pragma-attribute.c
diff options
context:
space:
mode:
authorErik Pilkington <erik.pilkington@gmail.com>2018-10-29 17:38:42 +0000
committerErik Pilkington <erik.pilkington@gmail.com>2018-10-29 17:38:42 +0000
commit7d18094813401ee56d4d97c88595db82b29b60f4 (patch)
treefb461f55ace71f247d069846725363af72ff3abe /clang/test/Sema/pragma-attribute.c
parente9d85264ac4cdf505c7497612d3fe7630590c52f (diff)
downloadbcm5719-llvm-7d18094813401ee56d4d97c88595db82b29b60f4.tar.gz
bcm5719-llvm-7d18094813401ee56d4d97c88595db82b29b60f4.zip
Revert "Revert "Support for groups of attributes in #pragma clang attribute""
This reverts commit r345487, which reverted r345486. I think the crashes were caused by an OOM on the builder, trying again to confirm... llvm-svn: 345517
Diffstat (limited to 'clang/test/Sema/pragma-attribute.c')
-rw-r--r--clang/test/Sema/pragma-attribute.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/clang/test/Sema/pragma-attribute.c b/clang/test/Sema/pragma-attribute.c
index d321f2ce4be..202b3f75faa 100644
--- a/clang/test/Sema/pragma-attribute.c
+++ b/clang/test/Sema/pragma-attribute.c
@@ -38,6 +38,29 @@ __attribute__((always_inline)) void optnone3() { } // expected-warning {{'always
#pragma clang attribute pop
+#pragma clang attribute push (__attribute__((annotate())), apply_to = function) // expected-error{{'annotate' attribute takes one argument}}
+#pragma clang attribute (__attribute__((annotate())), apply_to = function) // expected-error{{'annotate' attribute takes one argument}}
+
+void fun(); // expected-note 2 {{when applied to this declaration}}
+
+#pragma clang attribute pop
+#pragma clang attribute pop // expected-error{{'#pragma clang attribute pop' with no matching '#pragma clang attribute push'}}
+
+
+#pragma clang attribute push
+#pragma clang attribute (__attribute__((annotate())), apply_to = function) // expected-error 2 {{'annotate' attribute takes one argument}}
+
+void fun2(); // expected-note {{when applied to this declaration}}
+
+#pragma clang attribute push (__attribute__((annotate())), apply_to = function) // expected-error{{'annotate' attribute takes one argument}}
+void fun3(); // expected-note 2 {{when applied to this declaration}}
+#pragma clang attribute pop
+
+#pragma clang attribute pop
+#pragma clang attribute pop // expected-error{{'#pragma clang attribute pop' with no matching '#pragma clang attribute push'}}
+
+#pragma clang attribute (__attribute__((annotate)), apply_to = function) // expected-error{{'#pragma clang attribute' attribute with no matching '#pragma clang attribute push}}
+
#pragma clang attribute push ([[]], apply_to = function) // A noop
#pragma clang attribute pop // expected-error {{'#pragma clang attribute pop' with no matching '#pragma clang attribute push'}}
OpenPOWER on IntegriCloud