diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-19 20:17:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-19 20:17:11 +0000 |
commit | 9662cd32276053c5843f98b1e61807be5dc850ab (patch) | |
tree | c65eb4b870934a00902ec45e6be62619d36fa54b /clang/lib/Sema/SemaDecl.cpp | |
parent | be853b7b5d170b02ce9f10c76d268f0983444418 (diff) | |
download | bcm5719-llvm-9662cd32276053c5843f98b1e61807be5dc850ab.tar.gz bcm5719-llvm-9662cd32276053c5843f98b1e61807be5dc850ab.zip |
enhance the goto checker to reject jumps across __block variable definitions.
llvm-svn: 76376
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index bc497aa1421..28ac9d1982a 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -1954,7 +1954,8 @@ void Sema::CheckVariableDeclaration(VarDecl *NewVD, NamedDecl *PrevDecl, Diag(NewVD->getLocation(), diag::warn_attribute_weak_on_local); bool isVM = T->isVariablyModifiedType(); - if (isVM || NewVD->hasAttr<CleanupAttr>()) + if (isVM || NewVD->hasAttr<CleanupAttr>() || + NewVD->hasAttr<BlocksAttr>()) CurFunctionNeedsScopeChecking = true; if ((isVM && NewVD->hasLinkage()) || |