diff options
author | Erik Pilkington <erik.pilkington@gmail.com> | 2018-10-29 03:24:16 +0000 |
---|---|---|
committer | Erik Pilkington <erik.pilkington@gmail.com> | 2018-10-29 03:24:16 +0000 |
commit | b287a015e3a8f19734762f89ff02d877037c80e9 (patch) | |
tree | f8d8c5c09d763e15a4f84f75dd7e0fe04473e06b /clang/test | |
parent | a7cc6b360fe976c9105968d73f60e26172dc7b77 (diff) | |
download | bcm5719-llvm-b287a015e3a8f19734762f89ff02d877037c80e9.tar.gz bcm5719-llvm-b287a015e3a8f19734762f89ff02d877037c80e9.zip |
Revert "Support for groups of attributes in #pragma clang attribute"
This reverts commit r345486.
Looks like it causes some old versions of GCC to crash, I'll see if I can
work around it and recommit...
llvm-svn: 345487
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Parser/pragma-attribute.cpp | 7 | ||||
-rw-r--r-- | clang/test/Sema/pragma-attribute.c | 23 |
2 files changed, 3 insertions, 27 deletions
diff --git a/clang/test/Parser/pragma-attribute.cpp b/clang/test/Parser/pragma-attribute.cpp index c4ae2056fb9..bf14319fc55 100644 --- a/clang/test/Parser/pragma-attribute.cpp +++ b/clang/test/Parser/pragma-attribute.cpp @@ -100,12 +100,11 @@ void function(); #pragma clang attribute push(__attribute__((annotate("test"))), apply_to = any( variable(unless(is_parameter)), variable(unless(is_parameter)) )) // expected-error {{duplicate attribute subject matcher 'variable(unless(is_parameter))'}} #pragma clang attribute push(__attribute__((annotate("test"))), apply_to = any( variable(unless(is_parameter)), variable(unless(is_parameter)), enum, variable(unless(is_parameter)) )) // expected-error 2 {{duplicate attribute subject matcher 'variable(unless(is_parameter))'}} -#pragma clang attribute // expected-error {{expected 'push', 'pop', or '(' after '#pragma clang attribute'}} -#pragma clang attribute 42 // expected-error {{expected 'push', 'pop', or '(' after '#pragma clang attribute'}} +#pragma clang attribute // expected-error {{expected 'push' or 'pop' after '#pragma clang attribute'}} +#pragma clang attribute 42 // expected-error {{expected 'push' or 'pop' after '#pragma clang attribute'}} #pragma clang attribute pushpop // expected-error {{unexpected argument 'pushpop' to '#pragma clang attribute'; expected 'push' or 'pop'}} -#pragma clang attribute push -#pragma clang attribute pop +#pragma clang attribute push // expected-error {{expected '('}} #pragma clang attribute push ( // expected-error {{expected an attribute after '('}} #pragma clang attribute push (__attribute__((annotate)) // expected-error {{expected ')'}} #pragma clang attribute push () // expected-error {{expected an attribute after '('}} diff --git a/clang/test/Sema/pragma-attribute.c b/clang/test/Sema/pragma-attribute.c index 202b3f75faa..d321f2ce4be 100644 --- a/clang/test/Sema/pragma-attribute.c +++ b/clang/test/Sema/pragma-attribute.c @@ -38,29 +38,6 @@ __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'}} |