diff options
author | John McCall <rjmccall@apple.com> | 2011-02-02 13:00:07 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-02-02 13:00:07 +0000 |
commit | c63de66c4f50973b54e3341194bf847e7bfefe1f (patch) | |
tree | db578fef9737ff5f7d251069278373980f94fe22 /clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp | |
parent | fdfdbd091d663b1b3c12cf96064d755887b8aaa7 (diff) | |
download | bcm5719-llvm-c63de66c4f50973b54e3341194bf847e7bfefe1f.tar.gz bcm5719-llvm-c63de66c4f50973b54e3341194bf847e7bfefe1f.zip |
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
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp index 1aaaa68ca61..561777c2282 100644 --- a/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp @@ -56,7 +56,7 @@ static const BlockDeclRefExpr *FindBlockDeclRefExpr(const Stmt *S, void UndefCapturedBlockVarChecker::PostVisitBlockExpr(CheckerContext &C, const BlockExpr *BE) { - if (!BE->hasBlockDeclRefExprs()) + if (!BE->getBlockDecl()->hasCaptures()) return; const GRState *state = C.getState(); |