This patch is a band-aid. A proper solution would be too change trackNullOrUndefValue to only try to dereference the pointer when it is relevant to the problem.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp | ||
---|---|---|
1742 ↗ | (On Diff #166749) | I almost want to make Optional<Loc> non-convertible to bool, because it's almost always a bad idea to make decisions based on Loc-ness of SVal, as a lot of code assumes that Loc means lvalue, which is completely incorrect. |
clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp | ||
---|---|---|
1760 ↗ | (On Diff #166749) | The problem is FindLastStoreBRVisitor will later crash without this branch when attempting to dereference the region. |
clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp | ||
---|---|---|
1760 ↗ | (On Diff #166749) | Oh right, thanks! |