diff options
| author | Erik Pilkington <erik.pilkington@gmail.com> | 2019-04-11 17:55:30 +0000 |
|---|---|---|
| committer | Erik Pilkington <erik.pilkington@gmail.com> | 2019-04-11 17:55:30 +0000 |
| commit | c5a0583400b71f81faf9dedfaab094720c2ef823 (patch) | |
| tree | 5cecf0481ac9204698f89067c5c2d680e2341c39 /clang/test/SemaObjC | |
| parent | 7822b4618853a41aaa5ee3a7f14e0e32b1d29a64 (diff) | |
| download | bcm5719-llvm-c5a0583400b71f81faf9dedfaab094720c2ef823.tar.gz bcm5719-llvm-c5a0583400b71f81faf9dedfaab094720c2ef823.zip | |
Add support for attributes on @implementations in Objective-C
We want to make objc_nonlazy_class apply to implementations, but ran into this.
There doesn't seem to be any reason that this isn't supported.
Differential revision: https://reviews.llvm.org/D60542
llvm-svn: 358200
Diffstat (limited to 'clang/test/SemaObjC')
| -rw-r--r-- | clang/test/SemaObjC/attr-objc-non-lazy.m | 3 | ||||
| -rw-r--r-- | clang/test/SemaObjC/objc-asm-attribute-neg-test.m | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/clang/test/SemaObjC/attr-objc-non-lazy.m b/clang/test/SemaObjC/attr-objc-non-lazy.m index 5dc88f7935e..e5de24e422b 100644 --- a/clang/test/SemaObjC/attr-objc-non-lazy.m +++ b/clang/test/SemaObjC/attr-objc-non-lazy.m @@ -29,6 +29,7 @@ void foo(); @interface E @end +// expected-error@+1 {{'objc_nonlazy_class' attribute only applies to Objective-C interfaces}} __attribute__((objc_nonlazy_class)) -@implementation E // expected-error {{prefix attribute must be followed by an interface or protocol}} +@implementation E @end diff --git a/clang/test/SemaObjC/objc-asm-attribute-neg-test.m b/clang/test/SemaObjC/objc-asm-attribute-neg-test.m index f32abd22063..9941189357b 100644 --- a/clang/test/SemaObjC/objc-asm-attribute-neg-test.m +++ b/clang/test/SemaObjC/objc-asm-attribute-neg-test.m @@ -19,7 +19,7 @@ __attribute__((objc_runtime_name("MySecretNamespace.Message"))) // expected-erro id MyIVAR; } __attribute__((objc_runtime_name("MySecretNamespace.Message"))) -@property int MyProperty; // expected-error {{prefix attribute must be followed by an interface or protocol}}}} +@property int MyProperty; // expected-error {{prefix attribute must be followed by an interface, protocol, or implementation}}}} - (int) getMyProperty __attribute__((objc_runtime_name("MySecretNamespace.Message"))); // expected-error {{'objc_runtime_name' attribute only applies to}} @@ -28,7 +28,7 @@ __attribute__((objc_runtime_name("MySecretNamespace.Message"))) @end __attribute__((objc_runtime_name("MySecretNamespace.ForwardClass"))) -@class ForwardClass; // expected-error {{prefix attribute must be followed by an interface or protocol}} +@class ForwardClass; // expected-error {{prefix attribute must be followed by an interface, protocol, or implementation}} __attribute__((objc_runtime_name("MySecretNamespace.ForwardProtocol"))) @protocol ForwardProtocol; @@ -45,6 +45,6 @@ __attribute__((objc_runtime_name("MySecretNamespace.ForwardProtocol"))) @interface NoImpl @end +// expected-error@+1 {{'objc_runtime_name' attribute only applies to Objective-C interfaces and Objective-C protocols}} __attribute__((objc_runtime_name("MySecretNamespace.Message"))) -// expected-error@+1 {{prefix attribute must be followed by an interface or protocol}} @implementation NoImpl @end |

