aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/SVals.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-03-01 01:47:48 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-03-01 01:47:48 +0000
commit25a792b0361d80337c75a14320f5be1b210066dc (patch)
tree18e406ada2e0b8655aeed2aaef188545a34cee3d /lib/StaticAnalyzer/Core/SVals.cpp
parent3b3e1a1e8b44842ac3f07999c0f1eb82f13ffae4 (diff)
[analyzer] Remove SVal::getAsVarDecl() and reason about MemRegions, not Decls. Suggestion by Ted!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126734 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/SVals.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/SVals.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/StaticAnalyzer/Core/SVals.cpp b/lib/StaticAnalyzer/Core/SVals.cpp
index 76ad94e40d..4614e349de 100644
--- a/lib/StaticAnalyzer/Core/SVals.cpp
+++ b/lib/StaticAnalyzer/Core/SVals.cpp
@@ -60,16 +60,6 @@ const FunctionDecl *SVal::getAsFunctionDecl() const {
return NULL;
}
-const VarDecl* SVal::getAsVarDecl() const {
- if (const loc::MemRegionVal* X = dyn_cast<loc::MemRegionVal>(this)) {
- const MemRegion* R = X->getRegion();
- if (const VarRegion *VR = R->getAs<VarRegion>())
- return cast<VarDecl>(VR->getDecl());
- }
-
- return NULL;
-}
-
/// getAsLocSymbol - If this SVal is a location (subclasses Loc) and
/// wraps a symbol, return that SymbolRef. Otherwise return 0.
// FIXME: should we consider SymbolRef wrapped in CodeTextRegion?