Эх сурвалжийг харах

Tweak warning text for nil value in ObjC container warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179034 91177308-0d34-0410-b5e6-96231b3b80d8
Ted Kremenek 12 жил өмнө
parent
commit
f34cb3d3df

+ 1 - 1
lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp

@@ -124,7 +124,7 @@ void NilArgChecker::WarnIfNilArg(CheckerContext &C,
         os << "Array element cannot be nil";
         os << "Array element cannot be nil";
       } else if (Class == FC_NSDictionary) {
       } else if (Class == FC_NSDictionary) {
         if (Arg == 0) {
         if (Arg == 0) {
-          os << "Value stored in '";
+          os << "Value stored into '";
           os << GetReceiverInterfaceName(msg) << "' cannot be nil";
           os << GetReceiverInterfaceName(msg) << "' cannot be nil";
         } else {
         } else {
           assert(Arg == 1);
           assert(Arg == 1);

+ 2 - 2
test/Analysis/NSContainers.m

@@ -127,13 +127,13 @@ void testNilArgNSMutableDictionary3(NSMutableDictionary *d) {
 }
 }
 
 
 void testNilArgNSMutableDictionary5(NSMutableDictionary *d, NSString* key) {
 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) {
 void testNilArgNSMutableDictionary6(NSMutableDictionary *d, NSString *key) {
   if (key)
   if (key)
     ;
     ;
   d[key] = 0; // expected-warning {{'NSMutableDictionary' key cannot be nil}}
   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) {
 NSDictionary *testNilArgNSDictionary1(NSString* key) {