diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2014-10-03 20:05:33 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-10-03 20:05:33 +0000 |
| commit | aae7fefce8ee3e315b6d3bf3a188350e8da95826 (patch) | |
| tree | 137473c298091f8c1cc9beddb5240deb06917299 /clang/test/Misc | |
| parent | cf6b0c64b96cecaf961ef59f2b1db87f08f30881 (diff) | |
| download | bcm5719-llvm-aae7fefce8ee3e315b6d3bf3a188350e8da95826.tar.gz bcm5719-llvm-aae7fefce8ee3e315b6d3bf3a188350e8da95826.zip | |
Objective-C. Assortment of improvements pretty printing
objective-C declarations, including printing of availability
attributes on methods.
llvm-svn: 219013
Diffstat (limited to 'clang/test/Misc')
| -rw-r--r-- | clang/test/Misc/ast-print-objectivec.m | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/clang/test/Misc/ast-print-objectivec.m b/clang/test/Misc/ast-print-objectivec.m new file mode 100644 index 00000000000..5e7acd37b87 --- /dev/null +++ b/clang/test/Misc/ast-print-objectivec.m @@ -0,0 +1,41 @@ +// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s + +@interface NSObject @end + +@protocol P +- (void)MethP __attribute__((availability(macosx,introduced=10.1.0,deprecated=10.2))); +@end + +@interface I : NSObject <P> +- (void)MethI __attribute__((availability(macosx,introduced=10.1.0,deprecated=10.2))); +@end + +@interface I(CAT) +- (void)MethCAT __attribute__((availability(macosx,introduced=10.1.0,deprecated=10.2))); +@end + +@implementation I +- (void)MethP __attribute__((availability(macosx,introduced=10.1.0,deprecated=10.2))) {} +- (void)MethI __attribute__((availability(macosx,introduced=10.1.0,deprecated=10.2))) {} +@end + +// CHECK: @protocol P +// CHECK: - (void) MethP __attribute__((availability(macosx, introduced=10.1.0, deprecated=10.2))); +// CHECK: @end + +// CHECK: @interface I : NSObject<P> +// CHECK: - (void) MethI __attribute__((availability(macosx, introduced=10.1.0, deprecated=10.2))); +// CHECK: @end + +// CHECK: @interface I(CAT) +// CHECK: - (void) MethCAT __attribute__((availability(macosx, introduced=10.1.0, deprecated=10.2))); +// CHECK: @end + +// CHECK: @implementation I +// CHECK: - (void) MethP __attribute__((availability(macosx, introduced=10.1.0, deprecated=10.2))) { +// CHECK: } + +// CHECK: - (void) MethI __attribute__((availability(macosx, introduced=10.1.0, deprecated=10.2))) { +// CHECK: } + +// CHECK: @end |

