diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-10-07 19:54:22 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-10-07 19:54:22 +0000 |
commit | d29406233b051f3dcc9dc5316d204401016bef6b (patch) | |
tree | b37be5a3c115cf446706831ce404edb5880741d7 /clang/test/Rewriter | |
parent | 5a78755336ba7296568423d68d45d4b57aae8080 (diff) | |
download | llvm-d29406233b051f3dcc9dc5316d204401016bef6b.zip llvm-d29406233b051f3dcc9dc5316d204401016bef6b.tar.gz llvm-d29406233b051f3dcc9dc5316d204401016bef6b.tar.bz2 |
ObjectiveC modern rewriter. Rewrite typedefs
declared locally in ObjectiveC containers.
// rdar://15143875
llvm-svn: 192127
Diffstat (limited to 'clang/test/Rewriter')
-rw-r--r-- | clang/test/Rewriter/rewrite-interface-locals.mm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/Rewriter/rewrite-interface-locals.mm b/clang/test/Rewriter/rewrite-interface-locals.mm new file mode 100644 index 0000000..ef36105 --- /dev/null +++ b/clang/test/Rewriter/rewrite-interface-locals.mm @@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp +// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp +// rdar://15143875 + +@class NSData, NSError; + +@interface Foo + +typedef void (^Callback)(NSData *data, NSError *error); + +- (void)doSomething:(NSData *)data callback:(Callback)callback; +@end + +@implementation Foo + +- (void)doSomething:(NSData *)data callback:(Callback)callback { + callback(0, 0); +} + +@end |