summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2013-02-22 01:39:26 +0000
committerTed Kremenek <kremenek@apple.com>2013-02-22 01:39:26 +0000
commita3bb2b604422789a452d4b269061ad23e96729f7 (patch)
treeb02e067405fb5a886389d3403fc8f4cddaf2fc1f /clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
parent77569ffd0617b583e40c3e685a8b3f193ede7514 (diff)
downloadbcm5719-llvm-a3bb2b604422789a452d4b269061ad23e96729f7.tar.gz
bcm5719-llvm-a3bb2b604422789a452d4b269061ad23e96729f7.zip
Fix regression in modeling assignments of an address of a variable to itself. Fixes <rdar://problem/13226577>.
llvm-svn: 175852
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
index b656bbd83be..b392c43dd33 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
@@ -471,9 +471,7 @@ void ExprEngine::VisitDeclStmt(const DeclStmt *DS, ExplodedNode *Pred,
SVal InitVal = state->getSVal(InitEx, LC);
- if (InitVal == state->getLValue(VD, LC) ||
- (VD->getType()->isArrayType() &&
- isa<CXXConstructExpr>(InitEx->IgnoreImplicit()))) {
+ if (isa<CXXConstructExpr>(InitEx->IgnoreImplicit())) {
// We constructed the object directly in the variable.
// No need to bind anything.
B.generateNode(DS, UpdatedN, state);
OpenPOWER on IntegriCloud