r179034 - Tweak warning text for nil value in ObjC container warning.
Ted Kremenek
kremenek at apple.com
Mon Apr 8 11:09:16 PDT 2013
Author: kremenek
Date: Mon Apr 8 13:09:16 2013
New Revision: 179034
URL: http://llvm.org/viewvc/llvm-project?rev=179034&view=rev
Log:
Tweak warning text for nil value in ObjC container warning.
Modified:
cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
cfe/trunk/test/Analysis/NSContainers.m
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp?rev=179034&r1=179033&r2=179034&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp Mon Apr 8 13:09:16 2013
@@ -124,7 +124,7 @@ void NilArgChecker::WarnIfNilArg(Checker
os << "Array element cannot be nil";
} else if (Class == FC_NSDictionary) {
if (Arg == 0) {
- os << "Value stored in '";
+ os << "Value stored into '";
os << GetReceiverInterfaceName(msg) << "' cannot be nil";
} else {
assert(Arg == 1);
Modified: cfe/trunk/test/Analysis/NSContainers.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/NSContainers.m?rev=179034&r1=179033&r2=179034&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/NSContainers.m (original)
+++ cfe/trunk/test/Analysis/NSContainers.m Mon Apr 8 13:09:16 2013
@@ -127,13 +127,13 @@ void testNilArgNSMutableDictionary3(NSMu
}
void testNilArgNSMutableDictionary5(NSMutableDictionary *d, NSString* key) {
- d[key] = 0; // expected-warning {{Value stored in 'NSMutableDictionary' cannot be nil}}
+ d[key] = 0; // expected-warning {{Value stored into 'NSMutableDictionary' cannot be nil}}
}
void testNilArgNSMutableDictionary6(NSMutableDictionary *d, NSString *key) {
if (key)
;
d[key] = 0; // expected-warning {{'NSMutableDictionary' key cannot be nil}}
- // expected-warning at -1 {{Value stored in 'NSMutableDictionary' cannot be nil}}
+ // expected-warning at -1 {{Value stored into 'NSMutableDictionary' cannot be nil}}
}
NSDictionary *testNilArgNSDictionary1(NSString* key) {
More information about the cfe-commits
mailing list