xref: /minix3/external/bsd/llvm/dist/clang/test/FixIt/bridge-cast-in-arc.mm (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: not %clang_cc1 -triple x86_64-apple-darwin10  -fdiagnostics-parseable-fixits -x objective-c++ -fobjc-arc %s 2>&1 | FileCheck %s
2*f4a2713aSLionel Sambuc// rdar://12788838
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambucid obj;
5*f4a2713aSLionel Sambuc
6*f4a2713aSLionel Sambucvoid Test1() {
7*f4a2713aSLionel Sambuc  void *foo = reinterpret_cast<void *>(obj);
8*f4a2713aSLionel Sambuc}
9*f4a2713aSLionel Sambuc// CHECK: {7:15-7:39}:"(__bridge void *)"
10*f4a2713aSLionel Sambuc// CHECK: {7:15-7:39}:"(__bridge_retained void *)"
11*f4a2713aSLionel Sambuc
12*f4a2713aSLionel Sambuctypedef const void * CFTypeRef;
13*f4a2713aSLionel Sambucextern "C" CFTypeRef CFBridgingRetain(id X);
14*f4a2713aSLionel Sambuc
15*f4a2713aSLionel Sambucvoid Test2() {
16*f4a2713aSLionel Sambuc  void *foo = reinterpret_cast<void *>(obj);
17*f4a2713aSLionel Sambuc}
18*f4a2713aSLionel Sambuc// CHECK: {16:15-16:39}:"(__bridge void *)"
19*f4a2713aSLionel Sambuc// CHECK: {16:15-16:39}:"CFBridgingRetain"
20