diff options
Diffstat (limited to 'test/Rewriter/rewrite-typeof.mm')
-rw-r--r-- | test/Rewriter/rewrite-typeof.mm | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/test/Rewriter/rewrite-typeof.mm b/test/Rewriter/rewrite-typeof.mm index f95cd9a..b859ac3 100644 --- a/test/Rewriter/rewrite-typeof.mm +++ b/test/Rewriter/rewrite-typeof.mm @@ -1,4 +1,5 @@ -// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -o - %s +// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp +// RUN: FileCheck -check-prefix LP --input-file=%t-rw.cpp %s extern "C" { extern "C" void *_Block_copy(const void *aBlock); @@ -18,3 +19,21 @@ int main() { return 0; } +// CHECK-LP: ((void (^)(void))_Block_copy((const void *)(b))) + +// radar 7628153 +void f() { + int a; + __typeof__(a) aVal = a; + char *a1t = (char *)@encode(__typeof__(a)); + __typeof__(aVal) bVal; + char *a2t = (char *)@encode(__typeof__(bVal)); + __typeof__(bVal) cVal = bVal; + char *a3t = (char *)@encode(__typeof__(cVal)); + +} + + +// CHECK-LP: int aVal = a; + +// CHECK-LP: int bVal; |