[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

Anna Zaks ganna at apple.com
Mon Jul 16 16:59:49 PDT 2012


On Jul 16, 2012, at 3:08 PM, Jordan Rose wrote:

> 
> 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.
> 

Discussed with Jordan off line that the price we pay here is the time it takes to construct the Call object which differentiates between Property access and regular ObjC message call.
 
> Jordan

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


More information about the cfe-commits mailing list