This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] De-duplicate some code for discovering the origin of the symbol.
ClosedPublic

Authored by NoQ on Jul 11 2016, 3:16 PM.

Details

Summary

Or, more importantly, tell the users that there's a way to discover the region, value of which - at some moment of time - the symbol was introduced to represent. Idea proposed by Devin Coughlin.

Right now this is a simple code de-duplication, but in fact maybe it should be extended to support SymbolMetadata, SymbolExtent, and maybe, even more importantly, SymbolConjured (if the latter is created during invalidation of a region, *and* the symbol's structure is modified to remember that region - which i think is a useful idea, but that's another story; there's not much we could do for conjured-return-value symbols, even though sometimes even they should probably be tied to temporary object regions).

Diff Detail

Event Timeline

NoQ updated this revision to Diff 63594.Jul 11 2016, 3:16 PM
NoQ retitled this revision from to [analyzer] De-duplicate some code for discovering the origin of the symbol..
NoQ updated this object.
NoQ added a reviewer: dcoughlin.
NoQ added a subscriber: cfe-commits.
zaks.anna added inline comments.
include/clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h
81

Please, add a doxygen style comment.

NoQ updated this revision to Diff 63688.Jul 12 2016, 9:22 AM
NoQ marked an inline comment as done.

Added a doxygen comment, made the function virtual instead of branching.

zaks.anna accepted this revision.Jul 12 2016, 11:45 AM
zaks.anna added a reviewer: zaks.anna.
This revision is now accepted and ready to land.Jul 12 2016, 11:45 AM
This revision was automatically updated to reflect the committed changes.