This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Fix symbolication for unknown unary increment/decrement results.
ClosedPublic

Authored by NoQ on Mar 23 2017, 9:06 AM.

Details

Summary

If result of an unary increment or decrement is unknown, conjure a symbol to represent it based on the operator expression, not on the sub-expression.

In this particular test case, result of a LocAsInteger increment is unknown, and it gets symbolicated to an int *-type symbol, because sub-expression is an lvalue. This causes a crash later when we're trying to compare a Loc and a NonLoc.

Diff Detail

Repository
rL LLVM

Event Timeline

NoQ created this revision.Mar 23 2017, 9:06 AM
dcoughlin accepted this revision.Mar 23 2017, 10:23 AM

Looks good to me.

This revision is now accepted and ready to land.Mar 23 2017, 10:23 AM
This revision was automatically updated to reflect the committed changes.