]> granicus.if.org Git - clang/commitdiff
Tweak warning text for nil value in ObjC container warning.
authorTed Kremenek <kremenek@apple.com>
Mon, 8 Apr 2013 18:09:16 +0000 (18:09 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 8 Apr 2013 18:09:16 +0000 (18:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179034 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
test/Analysis/NSContainers.m

index afccb9bebc104afdcc2cb0c63d03b41c2e1b28b6..ed503d1cf910b9c5db7e96a87275f61c18fa65ee 100644 (file)
@@ -124,7 +124,7 @@ void NilArgChecker::WarnIfNilArg(CheckerContext &C,
         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);
index 2be7ae4058bd4233891460694bf25e024b655878..540c7a4eabdd6d76abc9e7ef450bb00824b4382c 100644 (file)
@@ -127,13 +127,13 @@ void testNilArgNSMutableDictionary3(NSMutableDictionary *d) {
 }
 
 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@-1 {{Value stored in 'NSMutableDictionary' cannot be nil}}
+  // expected-warning@-1 {{Value stored into 'NSMutableDictionary' cannot be nil}}
 }
 
 NSDictionary *testNilArgNSDictionary1(NSString* key) {