summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/SVals.cpp
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2018-10-02 20:48:12 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2018-10-02 20:48:12 +0000
commitd807f9065b43428f11da7b5e6a82a38a73286f5e (patch)
tree5fa4125be7c5b57b0b5c359788d2eef059d7ea90 /clang/lib/StaticAnalyzer/Core/SVals.cpp
parentbe6edb3a700209c4e66bbd70ad9d70652a56efed (diff)
downloadbcm5719-llvm-d807f9065b43428f11da7b5e6a82a38a73286f5e.tar.gz
bcm5719-llvm-d807f9065b43428f11da7b5e6a82a38a73286f5e.zip
[analyzer] Fix symbol discovery in nonloc::LocAsInteger values.
Doesn't do much despite sounding quite bad, but fixes an exotic test case where liveness of a nonloc::LocAsInteger array index is now evaluated correctly. Differential Revision: https://reviews.llvm.org/D52667 llvm-svn: 343631
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/SVals.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/SVals.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/SVals.cpp b/clang/lib/StaticAnalyzer/Core/SVals.cpp
index 559ca2c9840..b32be9e82d4 100644
--- a/clang/lib/StaticAnalyzer/Core/SVals.cpp
+++ b/clang/lib/StaticAnalyzer/Core/SVals.cpp
@@ -85,7 +85,7 @@ const FunctionDecl *SVal::getAsFunctionDecl() const {
SymbolRef SVal::getAsLocSymbol(bool IncludeBaseRegions) const {
// FIXME: should we consider SymbolRef wrapped in CodeTextRegion?
if (Optional<nonloc::LocAsInteger> X = getAs<nonloc::LocAsInteger>())
- return X->getLoc().getAsLocSymbol();
+ return X->getLoc().getAsLocSymbol(IncludeBaseRegions);
if (Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>()) {
const MemRegion *R = X->getRegion();
OpenPOWER on IntegriCloud