From: Fariborz Jahanian Date: Mon, 27 Oct 2014 23:41:04 +0000 (+0000) Subject: Improve on the diagnostic in my last patch and change warning X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5853f4807b051881d29c3e781b13b5a657be24e;p=clang Improve on the diagnostic in my last patch and change warning to error. rdar://18768214. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220740 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index d059e870bb..a2e7b59e15 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -4461,9 +4461,9 @@ def warn_arc_object_memaccess : Warning< "ownership-qualified type %2">, InGroup; 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; + InGroup, DefaultError; let CategoryName = "ARC and @properties" in { diff --git a/test/SemaObjC/arc-cfbridge-warning.m b/test/SemaObjC/arc-cfbridge-warning.m index 142983f1de..1077fb07ef 100644 --- a/test/SemaObjC/arc-cfbridge-warning.m +++ b/test/SemaObjC/arc-cfbridge-warning.m @@ -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}} }