This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Track non-zero values in ReturnVisitor
ClosedPublic

Authored by george.karpenkov on Aug 22 2018, 3:01 PM.

Details

Summary

Tracking those can help to provide much better diagnostics in many cases.

In general, most of the visitor machinery should be refactored to allow tracking the origin of arbitrary values.

rdar://36039765

Diff Detail

Repository
rC Clang

Event Timeline

NoQ accepted this revision.Aug 22 2018, 3:14 PM

I totally like where this is going.

clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
919 ↗(On Diff #162067)

Dunno, the seems inconsistent here.

clang/test/Analysis/uninit-const.cpp
58–62 ↗(On Diff #162067)

Let's arrange notes in the order in which they appear.

This revision is now accepted and ready to land.Aug 22 2018, 3:14 PM
NoQ added a comment.Aug 22 2018, 3:18 PM

Can we rename trackNullOrUndefValue into trackConcreteOrUndefValue now?

Probably not yet, I'm not sure how many other implicit nullability/undefidedness assumptions are there. But I hope eventually.

This revision was automatically updated to reflect the committed changes.