From 80b4ac76c5a7b99c143cd89f13ca192d24c51c2f Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 25 Jul 2012 22:09:19 +0000 Subject: [PATCH] Remove the ability to stash arbitrary pointers into UndefinedVal (no longer needed). llvm-svn: 160764 --- .../clang/StaticAnalyzer/Core/PathSensitive/SVals.h | 3 --- clang/lib/StaticAnalyzer/Core/Environment.cpp | 7 ------- 2 files changed, 10 deletions(-) diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h index e495d15d3528..e46265772800 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h @@ -163,13 +163,10 @@ public: class UndefinedVal : public SVal { public: UndefinedVal() : SVal(UndefinedKind) {} - UndefinedVal(const void *D) : SVal(UndefinedKind, D) {} static inline bool classof(const SVal* V) { return V->getBaseKind() == UndefinedKind; } - - const void *getData() const { return Data; } }; class DefinedOrUnknownSVal : public SVal { diff --git a/clang/lib/StaticAnalyzer/Core/Environment.cpp b/clang/lib/StaticAnalyzer/Core/Environment.cpp index 540eb88747fe..29030914e7e7 100644 --- a/clang/lib/StaticAnalyzer/Core/Environment.cpp +++ b/clang/lib/StaticAnalyzer/Core/Environment.cpp @@ -230,13 +230,6 @@ EnvironmentManager::removeDeadBindings(Environment Env, RSScaner.scan(X); continue; } - - // Otherwise the expression is dead with a couple exceptions. - // Do not misclean LogicalExpr or ConditionalOperator. It is dead at the - // beginning of itself, but we need its UndefinedVal to determine its - // SVal. - if (X.isUndef() && cast(X).getData()) - EBMapRef = EBMapRef.add(BlkExpr, X); } // Go through he deferred locations and add them to the new environment if