r220740 - Improve on the diagnostic in my last patch and change warning
Fariborz Jahanian
fjahanian at apple.com
Mon Oct 27 16:41:04 PDT 2014
Author: fjahanian
Date: Mon Oct 27 18:41:04 2014
New Revision: 220740
URL: http://llvm.org/viewvc/llvm-project?rev=220740&view=rev
Log:
Improve on the diagnostic in my last patch and change warning
to error. rdar://18768214.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/test/SemaObjC/arc-cfbridge-warning.m
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=220740&r1=220739&r2=220740&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Mon Oct 27 18:41:04 2014
@@ -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 {
Modified: cfe/trunk/test/SemaObjC/arc-cfbridge-warning.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc-cfbridge-warning.m?rev=220740&r1=220739&r2=220740&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc-cfbridge-warning.m (original)
+++ cfe/trunk/test/SemaObjC/arc-cfbridge-warning.m Mon Oct 27 18:41:04 2014
@@ -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}}
}
More information about the cfe-commits
mailing list