[PATCH] D48205: [analyzer] Assert that nonloc::SymbolVal always wraps a non-Loc-type symbol.
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 25 16:50:28 PDT 2018
NoQ added inline comments.
================
Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:1241
if (const llvm::APSInt *I =
- SVB.getKnownValue(State, nonloc::SymbolVal(S)))
+ SVB.getKnownValue(State, SVB.makeSymbolVal(S)))
return Loc::isLocType(S->getType()) ? (SVal)SVB.makeIntLocVal(*I)
----------------
george.karpenkov wrote:
> So what is the difference here? That `SVB.makeSymbolVal` is not always a nonloc?
That's right; it will be a symbolic region instead.
It won't affect the result of the calculation though (hopefully) (in the current implementation).
Repository:
rC Clang
https://reviews.llvm.org/D48205
More information about the cfe-commits
mailing list