From c63de66c4f50973b54e3341194bf847e7bfefe1f Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 2 Feb 2011 13:00:07 +0000 Subject: An insomniac stab at making block declarations list the variables they close on, as well as more reliably limiting invalid references to locals from nested scopes. llvm-svn: 124721 --- clang/lib/StaticAnalyzer/CFRefCount.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/StaticAnalyzer/CFRefCount.cpp') diff --git a/clang/lib/StaticAnalyzer/CFRefCount.cpp b/clang/lib/StaticAnalyzer/CFRefCount.cpp index 3278c4a2bfa..2790d545206 100644 --- a/clang/lib/StaticAnalyzer/CFRefCount.cpp +++ b/clang/lib/StaticAnalyzer/CFRefCount.cpp @@ -3417,7 +3417,7 @@ void RetainReleaseChecker::PostVisitBlockExpr(CheckerContext &C, // Scan the BlockDecRefExprs for any object the retain/release checker // may be tracking. - if (!BE->hasBlockDeclRefExprs()) + if (!BE->getBlockDecl()->hasCaptures()) return; const GRState *state = C.getState(); -- cgit v1.2.3