[cfe-commits] r143353 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td test/SemaObjC/arc-objc-lifetime.m test/SemaObjC/arc-unavailable-for-weakref.m test/SemaObjCXX/arc-unavailable-for-weakref.mm
Fariborz Jahanian
fjahanian at apple.com
Mon Oct 31 10:27:06 PDT 2011
Author: fjahanian
Date: Mon Oct 31 12:27:06 2011
New Revision: 143353
URL: http://llvm.org/viewvc/llvm-project?rev=143353&view=rev
Log:
Improve text of a diagnostic.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/test/SemaObjC/arc-objc-lifetime.m
cfe/trunk/test/SemaObjC/arc-unavailable-for-weakref.m
cfe/trunk/test/SemaObjCXX/arc-unavailable-for-weakref.mm
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=143353&r1=143352&r2=143353&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Mon Oct 31 12:27:06 2011
@@ -3043,7 +3043,7 @@
"an Objective-C pointer|an indirect pointer to an Objective-C pointer}1"
" to %3 is disallowed with ARC">;
def err_arc_nolifetime_behavior : Error<
- "explicit ownership qualifier on cast result would have no effect">;
+ "explicit ownership qualifier on cast result has no effect">;
def err_arc_objc_object_in_struct : Error<
"ARC forbids Objective-C objects in structs or unions">;
def err_arc_objc_property_default_assign_on_object : Error<
Modified: cfe/trunk/test/SemaObjC/arc-objc-lifetime.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc-objc-lifetime.m?rev=143353&r1=143352&r2=143353&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc-objc-lifetime.m (original)
+++ cfe/trunk/test/SemaObjC/arc-objc-lifetime.m Mon Oct 31 12:27:06 2011
@@ -17,14 +17,14 @@
- (CFStringRef)myString
{
CFStringRef myString =
- (__bridge CFStringRef) (__strong NSString *)CFBridgingRelease(); // expected-error {{explicit ownership qualifier on cast result would have no effect}}
+ (__bridge CFStringRef) (__strong NSString *)CFBridgingRelease(); // expected-error {{explicit ownership qualifier on cast result has no effect}}
myString =
- (__bridge CFStringRef) (__autoreleasing PNSString) CFBridgingRelease(); // expected-error {{explicit ownership qualifier on cast result would have no effect}}
+ (__bridge CFStringRef) (__autoreleasing PNSString) CFBridgingRelease(); // expected-error {{explicit ownership qualifier on cast result has no effect}}
myString =
(__bridge CFStringRef) (AUTORELEASEPNSString) CFBridgingRelease(); // OK
myString =
- (__bridge CFStringRef) (typeof(__strong NSString *)) CFBridgingRelease(); // expected-error {{explicit ownership qualifier on cast result would have no effect}}
+ (__bridge CFStringRef) (typeof(__strong NSString *)) CFBridgingRelease(); // expected-error {{explicit ownership qualifier on cast result has no effect}}
return myString;
}
Modified: cfe/trunk/test/SemaObjC/arc-unavailable-for-weakref.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc-unavailable-for-weakref.m?rev=143353&r1=143352&r2=143353&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc-unavailable-for-weakref.m (original)
+++ cfe/trunk/test/SemaObjC/arc-unavailable-for-weakref.m Mon Oct 31 12:27:06 2011
@@ -16,7 +16,7 @@
ns1 = (__weak sub *)obj; // expected-error {{assignment of a weak-unavailable object to a __weak object}} \
// expected-error {{class is incompatible with __weak references}} \
- // expected-error {{explicit ownership qualifier on cast result would have no effect}}
+ // expected-error {{explicit ownership qualifier on cast result has no effect}}
}
// rdar://9732636
@@ -32,7 +32,7 @@
__weak id weak2 = strong1; // expected-error {{assignment of a weak-unavailable object to a __weak object}}
return (__weak id)strong1; // expected-error {{cast of weak-unavailable object of type 'NOWEAK *' to a __weak object of type '__weak id'}} \
- // expected-error {{explicit ownership qualifier on cast result would have no effect}}
+ // expected-error {{explicit ownership qualifier on cast result has no effect}}
}
@protocol P @end
@@ -45,6 +45,6 @@
__weak id<P> weak2 = strong1; // expected-error {{assignment of a weak-unavailable object to a __weak object}}
return (__weak id<P>)strong1; // expected-error {{cast of weak-unavailable object of type 'NOWEAK<P,P1> *' to a __weak object of type '__weak id<P>'}} \
- // expected-error {{explicit ownership qualifier on cast result would have no effect}}
+ // expected-error {{explicit ownership qualifier on cast result has no effect}}
}
Modified: cfe/trunk/test/SemaObjCXX/arc-unavailable-for-weakref.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/arc-unavailable-for-weakref.mm?rev=143353&r1=143352&r2=143353&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjCXX/arc-unavailable-for-weakref.mm (original)
+++ cfe/trunk/test/SemaObjCXX/arc-unavailable-for-weakref.mm Mon Oct 31 12:27:06 2011
@@ -16,7 +16,7 @@
ns1 = (__weak sub *)obj; // expected-error {{assignment of a weak-unavailable object to a __weak object}} \
// expected-error {{class is incompatible with __weak references}} \
- // expected-error {{explicit ownership qualifier on cast result would have no effect}}
+ // expected-error {{explicit ownership qualifier on cast result has no effect}}
}
// rdar://9732636
@@ -32,7 +32,7 @@
__weak id weak2 = strong1; // expected-error {{assignment of a weak-unavailable object to a __weak object}}
return (__weak id)strong1; // expected-error {{cast of weak-unavailable object of type 'NOWEAK *' to a __weak object of type '__weak id'}} \
- // expected-error {{explicit ownership qualifier on cast result would have no effect}}
+ // expected-error {{explicit ownership qualifier on cast result has no effect}}
}
@protocol P @end
@@ -45,6 +45,6 @@
__weak id<P> weak2 = strong1; // expected-error {{assignment of a weak-unavailable object to a __weak object}}
return (__weak id<P, P1>)strong1; // expected-error {{cast of weak-unavailable object of type 'NOWEAK<P,P1> *' to a __weak object of type '__weak id<P,P1>'}} \
- // expected-error {{explicit ownership qualifier on cast result would have no effect}}
+ // expected-error {{explicit ownership qualifier on cast result has no effect}}
}
More information about the cfe-commits
mailing list