[cfe-commits] [PATCH] Removed another recursive visit in ExprEngine
Ted Kremenek
kremenek at apple.com
Thu Mar 1 11:35:23 PST 2012
Interesting. We aren't actually simulating a load, which is done by 'evalLoad', which triggers the dereference checking. We could do that after your cleanup.
On Mar 1, 2012, at 11:29 AM, Erik Verbruggen <erik.verbruggen at me.com> wrote:
> Hi Ted,
>
> I'll Hove it a spin. Do you by chance have any idea why clang (with and without patch) does not warn on the de-ref of the input parameter?
>
> -- Erik.
>
>
> On 1 mrt. 2012, at 20:22, Ted Kremenek <kremenek at apple.com> wrote:
>
>> Hi Erik,
>>
>> Can we just take this a step further and remove VisitAsmStmtHelperInputs and VisitAsmStmtHelperOutputs? All they do is "Visit" the subexpressions, which isn't needed any more. I think VisitAsmStmt could just be made into:
>>
>> StmtNodeBuilder Bldr(Pred, Dst, *currentBuilderContext);
>> // We have processed both the inputs and the outputs. All of the outputs
>> // should evaluate to Locs. Nuke all of their values.
>>
>> // FIXME: Some day in the future it would be nice to allow a "plug-in"
>> // which interprets the inline asm and stores proper results in the
>> // outputs.
>>
>> ProgramStateRef state = Pred->getState();
>>
>> for (AsmStmt::const_outputs_iterator OI = A->begin_outputs(),
>> OE = A->end_outputs(); OI != OE; ++OI) {
>>
>> SVal X = state->getSVal(*OI, Pred->getLocationContext());
>> assert (!isa<NonLoc>(X)); // Should be an Lval, or unknown, undef.
>>
>> if (isa<Loc>(X))
>> state = state->bindLoc(cast<Loc>(X), UnknownVal());
>> }
>>
>> Bldr.generateNode(A, Pred, state);
>> return;
>>
>>
>> On Mar 1, 2012, at 2:50 AM, Erik Verbruggen <erik.verbruggen at me.com> wrote:
>>
>>> Patch to remove another recursive visitiation in ExprEngine that is no longer needed because the CFG is fully linearized, this time for the AsmStmt.
>>>
>>> -- Erik.
>>> <0001-Remove-a-recursive-visitiation-in-ExprEngine-that-is.patch>_______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
More information about the cfe-commits
mailing list