]> granicus.if.org Git - clang/commitdiff
Improve on the diagnostic in my last patch and change warning
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 27 Oct 2014 23:41:04 +0000 (23:41 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 27 Oct 2014 23:41:04 +0000 (23:41 +0000)
to error. rdar://18768214.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220740 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
test/SemaObjC/arc-cfbridge-warning.m

index d059e870bbb52189988ca246697fdb75442acc60..a2e7b59e15d1ce8eb58364aa10fb4fefb2225b41 100644 (file)
@@ -4461,9 +4461,9 @@ def warn_arc_object_memaccess : Warning<
   "ownership-qualified type %2">, InGroup<ARCNonPodMemAccess>;
   
 def warn_arc_consumed_object_released : Warning<
-  "__bridge cast of collection literal of type %1 to \"bridgeable\" C "
+  "__bridge cast of collection literal of type %1 to bridgeable "
   "type %0 causes early release of the collection">,
-  InGroup<ARCBridgeCastRelease>;
+  InGroup<ARCBridgeCastRelease>, DefaultError;
 
 let CategoryName = "ARC and @properties" in {
 
index 142983f1dec16ff4d09dac54c0e85541637caf6c..1077fb07ef46477f8c90feeba9b1500eeb8a6d60 100644 (file)
@@ -37,5 +37,5 @@ static CFStringRef _s;
 
 CFArrayRef _array()
 {
-    return (__bridge CFArrayRef)@[(__bridge NSString *)_s]; // expected-warning {{__bridge cast of collection literal of type 'NSArray *' to "bridgeable" C type 'CFArrayRef' (aka 'const struct __CFArray *') causes early release of the collection}}
+    return (__bridge CFArrayRef)@[(__bridge NSString *)_s]; // expected-error {{__bridge cast of collection literal of type 'NSArray *' to bridgeable type 'CFArrayRef' (aka 'const struct __CFArray *') causes early release of the collection}}
 }