summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2018-11-21 12:47:43 +0000
committerNico Weber <nicolasweber@gmx.de>2018-11-21 12:47:43 +0000
commit9f0246d47390775ec3bf2c2b7e4ded3d26193468 (patch)
treeb04d1324ec67a7b17d8824779c13deb94dac2812 /clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
parent4923930be5367488be818168916ad94dc878bb59 (diff)
downloadbcm5719-llvm-9f0246d47390775ec3bf2c2b7e4ded3d26193468.tar.gz
bcm5719-llvm-9f0246d47390775ec3bf2c2b7e4ded3d26193468.zip
Revert r347364 again, the fix was incomplete.
llvm-svn: 347389
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
index 7d47cf4f337..fb13e89b5fa 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
@@ -810,9 +810,8 @@ void ExprEngine::
VisitOffsetOfExpr(const OffsetOfExpr *OOE,
ExplodedNode *Pred, ExplodedNodeSet &Dst) {
StmtNodeBuilder B(Pred, Dst, *currBldrCtx);
- Expr::EvalResult Result;
- if (OOE->EvaluateAsInt(Result, getContext())) {
- APSInt IV = Result.Val.getInt();
+ APSInt IV;
+ if (OOE->EvaluateAsInt(IV, getContext())) {
assert(IV.getBitWidth() == getContext().getTypeSize(OOE->getType()));
assert(OOE->getType()->isBuiltinType());
assert(OOE->getType()->getAs<BuiltinType>()->isInteger());
OpenPOWER on IntegriCloud