浏览代码

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 年之前
父节点
当前提交
f34cb3d3df
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
  2. 2 2
      test/Analysis/NSContainers.m

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

@@ -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);

+ 2 - 2
test/Analysis/NSContainers.m

@@ -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) {