aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-12-06 07:17:04 +0000
committerTed Kremenek <kremenek@apple.com>2012-12-06 07:17:04 +0000
commite0c6c67d670588508da2d343193cfe2845bef7e0 (patch)
treebb8a5202de37086885ee53f86c917be108988853 /lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp
parent030a6644f253818b81b4d8a7fc1770c0a3d35474 (diff)
Use 'getOriginalRegion()' rather than going through the logic to recreate it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169478 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp b/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp
index 6023048601..865cbad8a0 100644
--- a/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp
@@ -75,9 +75,7 @@ UndefCapturedBlockVarChecker::checkPostStmt(const BlockExpr *BE,
continue;
// Get the VarRegion associated with VD in the local stack frame.
- const LocationContext *LC = C.getLocationContext();
- VR = C.getSValBuilder().getRegionManager().getVarRegion(VD, LC);
- SVal VRVal = state->getSVal(VR);
+ SVal VRVal = state->getSVal(I.getOriginalRegion());
if (VRVal.isUndef())
if (ExplodedNode *N = C.generateSink()) {