summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/method-attributes.m
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-12-02 13:20:44 +0000
committerdim <dim@FreeBSD.org>2012-12-02 13:20:44 +0000
commit056abd2059c65a3e908193aeae16fad98017437c (patch)
tree2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /test/SemaObjC/method-attributes.m
parentcc73504950eb7b5dff2dded9bedd67bc36d64641 (diff)
downloadFreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.zip
FreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.tar.gz
Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2):
http://llvm.org/svn/llvm-project/cfe/branches/release_32@168974
Diffstat (limited to 'test/SemaObjC/method-attributes.m')
-rw-r--r--test/SemaObjC/method-attributes.m29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/SemaObjC/method-attributes.m b/test/SemaObjC/method-attributes.m
index f7252af..b402d52 100644
--- a/test/SemaObjC/method-attributes.m
+++ b/test/SemaObjC/method-attributes.m
@@ -55,3 +55,32 @@
- (IBAction)doSomething2:(id)sender {} // expected-warning {{attributes on method implementation and its declaration must match}}
- (IBAction)doSomething3:(id)sender {}
@end
+
+// rdar://11593375
+@interface NSObject @end
+
+@interface Test : NSObject
+-(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) method4: (int)arg1 __attribute__((aligned(16))) __attribute__((deprecated)) __attribute__((unavailable));
+@end
+
+@implementation Test
+-(id)method __attribute__((aligned(16))) __attribute__((aligned(16))) __attribute__((deprecated)) {
+ return self;
+}
+-(id)method1 __attribute__((aligned(16))) {
+ return self;
+}
+-(id)method2 {
+ return self;
+}
+- (id) method3: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)) { // expected-warning {{attributes on method implementation and its declaration must match}}
+ return self;
+}
+- (id) method4: (int)arg1 __attribute__((aligned(16))) __attribute__((deprecated)) __attribute__((unavailable)) {
+ return self;
+}
+@end
OpenPOWER on IntegriCloud