This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Reimplement trackExpressionValue as ExpressionHandler
ClosedPublic

Authored by vsavchenko on Jun 3 2021, 6:51 AM.

Details

Summary

This commit moves trackExpressionValue into the Tracker interface
as DefaultExpressionHandler. It still can be split into smaller
handlers, but that can be a future change.

Additionally, this commit doesn't remove the original trackExpressionValue
interface, so it's not too big. One of the next commits will address it.

Diff Detail

Event Timeline

vsavchenko created this revision.Jun 3 2021, 6:51 AM
vsavchenko requested review of this revision.Jun 3 2021, 6:51 AM
Herald added a project: Restricted Project. ยท View Herald TranscriptJun 3 2021, 6:51 AM
Herald added a subscriber: cfe-commits. ยท View Herald Transcript
NoQ accepted this revision.Jun 9 2021, 9:51 PM

Everything's perfect, can't complain!

This revision is now accepted and ready to land.Jun 9 2021, 9:51 PM

Rebase and change how we call track for values

Rebase and change KnownSVal to SVal in trackStoredValue

Oh boy! I screwed up with interactive rebases ๐Ÿฅฒ

Remove parts from the next commit

Szelethus added inline comments.Jun 14 2021, 4:16 AM
clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
2069โ€“2070

I recall that reports that don't invoke trackExpressionValue were rather small in scope (usually a few LOC), and those in particular tended to get bigger but not better. A lot of effort went into making sure we're only placing notes where we were reasonably sure they added value -- its been a while though, so a fresh look at this wouldn't hurt.