From 9662cd32276053c5843f98b1e61807be5dc850ab Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 19 Jul 2009 20:17:11 +0000 Subject: enhance the goto checker to reject jumps across __block variable definitions. llvm-svn: 76376 --- clang/lib/Sema/JumpDiagnostics.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/Sema/JumpDiagnostics.cpp') 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()) return diag::note_protected_by_cleanup; + if (VD->hasAttr()) + return diag::note_protected_by___block; } else if (const TypedefDecl *TD = dyn_cast(D)) { if (TD->getUnderlyingType()->isVariablyModifiedType()) return diag::note_protected_by_vla_typedef; -- cgit v1.2.3