]> granicus.if.org Git - clang/commitdiff
[analyzer] Simplify the condition.
authorAnna Zaks <ganna@apple.com>
Mon, 5 Dec 2011 21:33:01 +0000 (21:33 +0000)
committerAnna Zaks <ganna@apple.com>
Mon, 5 Dec 2011 21:33:01 +0000 (21:33 +0000)
This is a fixup for r145832.

The extra clauses do not matter after we remove the dependency on canReasonAbout(InitVal) in r145832.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145856 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Core/ExprEngineC.cpp

index 12b658eb2d2950286efaa77d96c8446f3be158c2..fadfdc40d743c502f80cd8dc1e0f5cbe9cb1e0c8 100644 (file)
@@ -357,9 +357,7 @@ void ExprEngine::VisitDeclStmt(const DeclStmt *DS, ExplodedNode *Pred,
       
       // Recover some path-sensitivity if a scalar value evaluated to
       // UnknownVal.
-      if ((InitVal.isUnknown()) &&
-          !VD->getType()->isReferenceType() &&
-          !Pred->getState()->isTainted(InitVal)) {
+      if (InitVal.isUnknown()) {
         InitVal = svalBuilder.getConjuredSymbolVal(NULL, InitEx,
                                  currentBuilderContext->getCurrentBlockCount());
       }