aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/RegionStore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/StaticAnalyzer/Core/RegionStore.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/RegionStore.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/RegionStore.cpp b/lib/StaticAnalyzer/Core/RegionStore.cpp
index 310c080faf..acda9e0af3 100644
--- a/lib/StaticAnalyzer/Core/RegionStore.cpp
+++ b/lib/StaticAnalyzer/Core/RegionStore.cpp
@@ -1578,7 +1578,7 @@ static Optional<SVal> getConstValue(SValBuilder &SVB, const VarDecl *VD) {
return None;
llvm::APSInt Result;
- if (Init->EvaluateAsInt(Result, Ctx))
+ if (!Init->isGLValue() && Init->EvaluateAsInt(Result, Ctx))
return SVB.makeIntVal(Result);
if (Init->isNullPointerConstant(Ctx, Expr::NPC_ValueDependentIsNotNull))