From e0c6c67d670588508da2d343193cfe2845bef7e0 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 6 Dec 2012 07:17:04 +0000 Subject: [PATCH] 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 --- lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp | 4 +--- 1 file changed, 1 insertion(+), 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()) { -- 2.40.0