diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-11-23 00:14:32 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-11-23 00:14:32 +0000 |
commit | 36129a953de3d1e88bd683f2de6fc32efee9ab4b (patch) | |
tree | 2e78213bf1816e17d87512c62a40c0477cbe96b5 /clang/test/SemaObjC/method-attributes.m | |
parent | 4751d701b743270db71f81e2f1bc31758eadc8d2 (diff) | |
download | bcm5719-llvm-36129a953de3d1e88bd683f2de6fc32efee9ab4b.tar.gz bcm5719-llvm-36129a953de3d1e88bd683f2de6fc32efee9ab4b.zip |
ObjectiveC. Remove warning diagnostic which checks
attribute on method declaration and implementation
match. This makes no sense. Most annotations are
meant for declarations only and one is for implementation.
This has been constant source of regresions and hackery to
get around special cases. I am removing this check.
Such checks must be done on a case by case basis and
when it makes sense. For example, it makes sense
for availability/deprecated and I will file a radar
for that. // rdar://15531984
llvm-svn: 195524
Diffstat (limited to 'clang/test/SemaObjC/method-attributes.m')
-rw-r--r-- | clang/test/SemaObjC/method-attributes.m | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/test/SemaObjC/method-attributes.m b/clang/test/SemaObjC/method-attributes.m index 339d3db77a1..41c685d0064 100644 --- a/clang/test/SemaObjC/method-attributes.m +++ b/clang/test/SemaObjC/method-attributes.m @@ -14,20 +14,20 @@ @interface INTF - (int) foo1: (int)arg1 __attribute__((deprecated)); -- (int) foo: (int)arg1; // expected-note {{method 'foo:' declared here}} +- (int) foo: (int)arg1; -- (int) foo2: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)); // expected-note {{method 'foo2:' declared here}} +- (int) foo2: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)); - (int) foo3: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)) __attribute__((ns_consumes_self)); @end @implementation INTF -- (int) foo: (int)arg1 __attribute__((deprecated)){ // expected-warning {{attributes on method implementation and its declaration must match}} +- (int) foo: (int)arg1 __attribute__((deprecated)){ return 10; } - (int) foo1: (int)arg1 { return 10; } -- (int) foo2: (int)arg1 __attribute__((deprecated)) { // expected-warning {{attributes on method implementation and its declaration must match}} +- (int) foo2: (int)arg1 __attribute__((deprecated)) { return 10; } - (int) foo3: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)) __attribute__((ns_consumes_self)) {return 0; } @@ -40,7 +40,7 @@ @interface Foo - (void)doSomething1:(id)sender; -- (void)doSomething2:(id)sender; // expected-note {{method 'doSomething2:' declared here}} +- (void)doSomething2:(id)sender; @end @implementation Foo @@ -53,7 +53,7 @@ @end @implementation Bar - (IBAction)doSomething1:(id)sender {} -- (IBAction)doSomething2:(id)sender {} // expected-warning {{attributes on method implementation and its declaration must match}} +- (IBAction)doSomething2:(id)sender {} - (IBAction)doSomething3:(id)sender {} @end @@ -64,7 +64,7 @@ -(id)method __attribute__((deprecated)); -(id)method1; -(id)method2 __attribute__((aligned(16))); -- (id) method3: (int)arg1 __attribute__((aligned(16))) __attribute__((deprecated)) __attribute__((unavailable)); // expected-note {{method 'method3:' declared here}} +- (id) method3: (int)arg1 __attribute__((aligned(16))) __attribute__((deprecated)) __attribute__((unavailable)); - (id) method4: (int)arg1 __attribute__((aligned(16))) __attribute__((deprecated)) __attribute__((unavailable)); @end @@ -78,7 +78,7 @@ -(id)method2 { return self; } -- (id) method3: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)) { // expected-warning {{attributes on method implementation and its declaration must match}} +- (id) method3: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)) { return self; } - (id) method4: (int)arg1 __attribute__((aligned(16))) __attribute__((deprecated)) __attribute__((unavailable)) { |