Lines Matching +full:objective +full:- +full:c

1 // RUN: %clang_cc1 -fsyntax-only -x objective-c++ -fobjc-arc -verify -Wno-objc-root-class %s
4 typedef struct __attribute__ ((objc_bridge(NSError))) __CFErrorRef * CFErrorRef; // expected-note 3…
6 typedef struct __attribute__ ((objc_bridge(MyError))) __CFMyErrorRef * CFMyErrorRef; // expected-no…
8 …yColor *CFMyColorRef; // expected-error {{parameter of 'objc_bridge' attribute must be a single n…
10 typedef struct __attribute__ ((objc_bridge)) __CFArray *CFArrayRef; // expected-error {{'objc_bridg…
12 typedef struct __attribute__((objc_bridge(NSLocale, NSError))) __CFLocale *CFLocaleRef;// expected-
27 typedef struct __attribute__((objc_bridge(NSTesting))) __CFError *CFTestingRef; // expected-note {{…
30 …>(cf); // expected-error {{CF object of type 'CFTestingRef' (aka '__CFError *') is bridged to 'NST…
31 …// expected-error {{cast of C pointer type 'CFTestingRef' (aka '__CFError *') to Objective-C point…
32 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
33 …// expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFTestin…
38 typedef CFErrorRef1 CFErrorRef2; // expected-note 1 {{declared here}}
46 @interface NSError<P1, P2, P3> @end // expected-note 3 {{declared here}}
48 @interface MyError : NSError // expected-note 1 {{declared here}}
55 void Test2(CFErrorRef2 cf, NSError *ns, NSString *str, Class c, CFUColor2Ref cf2) {
56 …(void)static_cast<NSString *>(cf); // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') brid…
57 …// expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *') to Objective-C poi…
58 … // expected-note {{__bridge with C-style cast to convert directly (no change in ownership)}} \
59 …// expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFErrorR…
60 …ic_cast<NSError *>(cf); // expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRe…
61 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
62 …// expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFErrorR…
63 …tic_cast<MyError*>(cf); // expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRe…
64 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
65 …// expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFErrorR…
66 // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges to NSError, not 'MyError'}}
67 …ast<NSUColor *>(cf2); // expected-error {{cast of C pointer type 'CFUColor2Ref' (aka '__CFUPrimeCo…
68 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
69 …// expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFUColor…
70 …(void)static_cast<CFErrorRef>(ns); // expected-error {{cast of Objective-C pointer type 'NSError *…
71 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
72 …// expected-note {{use __bridge_retained with C-style cast to make an ARC object available as a +1…
73 …(void)static_cast<CFErrorRef>(str); // expected-warning {{'NSString' cannot bridge to 'CFErrorRef…
74 …// expected-error {{cast of Objective-C pointer type 'NSString *' to C pointer type 'CFErrorRef' (…
75 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
76 …// expected-note {{use __bridge_retained with C-style cast to make an ARC object available as a +1…
77 …(void)static_cast<Class>(cf); // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges t…
78 …// expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *') to Objective-C poi…
79 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
80 …// expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFErrorR…
81 …(void)static_cast<CFErrorRef>(c); // expected-warning {{'Class' cannot bridge to 'CFErrorRef' (aka…
82 …// expected-error {{cast of Objective-C pointer type 'Class' to C pointer type 'CFErrorRef' (aka '…
83 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
84 …// expected-note {{use __bridge_retained with C-style cast to make an ARC object available as a +1…
89 …id)static_cast<id>(cf); // expected-error {{cast of C pointer type 'CFErrorRef' (aka '__CFErrorRef…
90 // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
91 …// expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFErrorR…
92 …cast< id<P1, P2> >(cf); // expected-error {{cast of C pointer type 'CFErrorRef' (aka '__CFErrorRef…
93 // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
94 …// expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFErrorR…
95 …(void)static_cast< id<P1, P2, P4> >(cf); // expected-warning {{'CFErrorRef' (aka '__CFErrorRef *')…
96 …// expected-error {{cast of C pointer type 'CFErrorRef' (aka '__CFErrorRef *') to Objective-C poin…
97 // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
98 …// expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFErrorR…
102 …)static_cast<id>(cf); // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorR…
103 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
104 …// expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFMyErro…
105 …st< id<P1, P2> >(cf); // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorR…
106 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
107 …// expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFMyErro…
108 …id<P1, P2, P3> >(cf); // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorR…
109 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
110 …// expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFMyErro…
111 …st< id<P2, P3> >(cf); // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorR…
112 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
113 …// expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFMyErro…
114 …(void)static_cast< id<P1, P2, P4> >(cf); // expected-warning {{'CFMyErrorRef' (aka '__CFMyErrorRef…
115 …// expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') to Objective-C
116 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
117 …// expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFMyErro…
121 …(void)static_cast<CFErrorRef>(ID); // expected-error {{cast of Objective-C pointer type 'id' to C
122 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
123 …// expected-note {{use __bridge_retained with C-style cast to make an ARC object available as a +1…
124 …oid)static_cast<CFErrorRef>(P123); // expected-error {{cast of Objective-C pointer type 'id<P1,P2,…
125 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
126 …// expected-note {{use __bridge_retained with C-style cast to make an ARC object available as a +1…
127 …)static_cast<CFErrorRef>(P1234); // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3…
128 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
129 …// expected-note {{use __bridge_retained with C-style cast to make an ARC object available as a +1…
130 …(void)static_cast<CFErrorRef>(P12); // expected-error {{cast of Objective-C pointer type 'id<P1,P2…
131 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
132 …// expected-note {{use __bridge_retained with C-style cast to make an ARC object available as a +1…
133 …(void)static_cast<CFErrorRef>(P23); // expected-error {{cast of Objective-C pointer type 'id<P2,P3…
134 … // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
135 …// expected-note {{use __bridge_retained with C-style cast to make an ARC object available as a +1…