]> granicus.if.org Git - clang/commitdiff
Use 'getOriginalRegion()' rather than going through the logic to recreate it.
authorTed Kremenek <kremenek@apple.com>
Thu, 6 Dec 2012 07:17:04 +0000 (07:17 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 6 Dec 2012 07:17:04 +0000 (07:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169478 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp

index 6023048601f2b316e2ea2e3702d9392eff532736..865cbad8a0fcfb5ebf9d6c1da4c3a8cb4078dfef 100644 (file)
@@ -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()) {