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/JumpDiagnostics.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/JumpDiagnostics.cpp')
-rw-r--r-- | clang/lib/Sema/JumpDiagnostics.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Sema/JumpDiagnostics.cpp b/clang/lib/Sema/JumpDiagnostics.cpp index ae863f2df1e..853adaa3368 100644 --- a/clang/lib/Sema/JumpDiagnostics.cpp +++ b/clang/lib/Sema/JumpDiagnostics.cpp @@ -83,6 +83,8 @@ static unsigned GetDiagForGotoScopeDecl(const Decl *D) { return diag::note_protected_by_vla; if (VD->hasAttr<CleanupAttr>()) return diag::note_protected_by_cleanup; + if (VD->hasAttr<BlocksAttr>()) + return diag::note_protected_by___block; } else if (const TypedefDecl *TD = dyn_cast<TypedefDecl>(D)) { if (TD->getUnderlyingType()->isVariablyModifiedType()) return diag::note_protected_by_vla_typedef; |