On Jul 26, 2012, at 10:34 , Ted Kremenek <[email protected]> wrote:

>>> // Don't check for uninitialized field values in arguments if the
>>> // caller has a body that is available and we have the chance to inline it.
>>> // This is a hack, but is a reasonable compromise betweens sometimes warning
>>> // and sometimes not depending on if we decide to inline a function.
>>> const Decl *D = Call.getDecl();
>>> const bool checkUninitFields =
>>> -    !(C.getAnalysisManager().shouldInlineCall() &&
>>> -      (D && D->getBody()));
>>> +    !(C.getAnalysisManager().shouldInlineCall() && (D && D->getBody())); 
>> 
>> Yeah, this should be refactored into CallEvent anyway, either 
>> CallEvent::mayBeInlined or CallEvent::willBeInlined. The test is wrong 
>> because a CallEvent's decl is often not the decl with the definition.
> 
> Interesting.  All I did was change the indentation.  Perhaps something like 
> "Call.getDefininingDecl()" which returns the correct Decl* if it exists?

Anna's recent simplification of getDefinition (and name change to 
getRuntimeDefinition) does maybe 80% of this. The remaining 20% is the other 
conditions we check in ExprEngine::inlineCall and ExprEngine::shouldInlineDecl. 
This is already on my queue (from Anna's comments a week ago).
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to