On Jul 19, 2012, at 5:40 PM, Anna Zaks wrote:

>>> +ProgramStateRef ExprEngine::bindReturnValue(const CallEvent &Call,
>>> +                                            const LocationContext *LCtx,
>>> +                                            ProgramStateRef State) {
>>> +  const Expr *E = Call.getOriginExpr();
>>> +  if (!E)
>>> +    return State;
>>> +
>>> +  // Some method families have known return values.
>>> +  if (const ObjCMethodCall *Msg = dyn_cast<ObjCMethodCall>(&Call)) {
>>> +    switch (Msg->getMethodFamily()) {
>>> +    default:
>>> +      break;
>>> +    case OMF_autorelease:
>>> +    case OMF_retain:
>>> +    case OMF_self: {
>>> +      // These methods return their receivers.
>>> +      return State->BindExpr(E, LCtx, Msg->getReceiverSVal());
>>> +      break;
>>> +    }
>>> +    }
>>> +  }
>> 
>> The inner braces are not necessary anymore here. Also, you have a break 
>> after a return.
> 
> I'd like to keep the braces of the if since the switch is visually long (do 
> we have a coding standard for unnecessary braces?).

Yes, I agree there. I meant the braces around the switch case.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to