aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/JumpDiagnostics.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-19 20:17:11 +0000
committerChris Lattner <sabre@nondot.org>2009-07-19 20:17:11 +0000
commitbe6d259a375bbec49659d54a302c4758058f2eef (patch)
tree54ca9cd68f42a2ec021ab10832a509ccd97db96c /lib/Sema/JumpDiagnostics.cpp
parent96e18b05ea6b55aa92a1a576f29e9cee73a7e20b (diff)
enhance the goto checker to reject jumps across __block variable definitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76376 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/JumpDiagnostics.cpp')
-rw-r--r--lib/Sema/JumpDiagnostics.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/JumpDiagnostics.cpp b/lib/Sema/JumpDiagnostics.cpp
index ae863f2df1..853adaa336 100644
--- a/lib/Sema/JumpDiagnostics.cpp
+++ b/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;