[cfe-commits] r159563 - in /cfe/trunk: lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp test/Analysis/misc-ps-region-store.m test/Analysis/nonnull.m

Jordan Rose jordan_rose at apple.com
Mon Jul 16 15:08:19 PDT 2012


On Jul 16, 2012, at 13:28 , Anna Zaks <ganna at apple.com> wrote:

>> +  switch (Call.getKind()) {
>> +  case CE_ObjCPropertyAccess:
>> +    BT = &BT_msg_arg;
>> +    // Getters do not have arguments, so we don't need to worry about this.
>> +    Desc = "Argument for property setter is an uninitialized value";
>> +    break;
>> +  case CE_ObjCMessage:
>> +    BT = &BT_msg_arg;
>> +    Desc = "Argument in message expression is an uninitialized value";
>> +    break;
>> +  case CE_Block:
>> +    BT = &BT_call_arg;
>> +    Desc = "Block call argument is an uninitialized value";
>> +    break;
>> +  default:
>> +    BT = &BT_call_arg;
>> +    Desc = "Function call argument is an uninitialized value";
>> +    break;
>>  }
> 
> Can we only switch/perform bug description assignment if we know there is an error?

It's nicer to do it once here than after we've already dived down into the individual arguments. This isn't expensive; these are all pointer assignments.

Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120716/475a2a38/attachment.html>


More information about the cfe-commits mailing list