summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2011-10-26 21:06:44 +0000
committerAnna Zaks <ganna@apple.com>2011-10-26 21:06:44 +0000
commitc9abbe2b3e1f36a3948c9c5da4cf88cfa9645239 (patch)
tree62f8fa8f63bc204144fcd9283ae5583f31bd3960 /clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
parent6b1c21268d428b465a3a82b856dbc05e4e7e5917 (diff)
downloadbcm5719-llvm-c9abbe2b3e1f36a3948c9c5da4cf88cfa9645239.tar.gz
bcm5719-llvm-c9abbe2b3e1f36a3948c9c5da4cf88cfa9645239.zip
[analyzer] Add getLocationContext to CheckerContext
CheckerContext::getPredecessor is only used to get to the LocationContext half of the times. llvm-svn: 143061
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
index 1795b82fbbf..4299a12e387 100644
--- a/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
@@ -1733,7 +1733,7 @@ void CStringChecker::checkPreStmt(const DeclStmt *DS, CheckerContext &C) const {
if (!isa<StringLiteral>(Init))
continue;
- Loc VarLoc = state->getLValue(D, C.getPredecessor()->getLocationContext());
+ Loc VarLoc = state->getLValue(D, C.getLocationContext());
const MemRegion *MR = VarLoc.getAsRegion();
if (!MR)
continue;
OpenPOWER on IntegriCloud