diff options
author | Mike Stump <mrs@apple.com> | 2009-04-14 00:57:29 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-04-14 00:57:29 +0000 |
commit | f33651c2d79d47d8d05908185613fe33a3e18d89 (patch) | |
tree | 08c045c2c360401632cda99875cbc43e99360322 /lib/Sema/SemaDecl.cpp | |
parent | 38c1effc8549af15d5049a684257c7ca8e9c7a87 (diff) |
Fixup CodeGen for __weak __block variables. Radar 6756266
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69010 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index ef8b9e842e..f4f131141f 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -1803,7 +1803,8 @@ bool Sema::CheckVariableDeclaration(VarDecl *NewVD, NamedDecl *PrevDecl, Invalid = true; } - if (NewVD->hasLocalStorage() && T.isObjCGCWeak()) + if (NewVD->hasLocalStorage() && T.isObjCGCWeak() + && !NewVD->getAttr<BlocksAttr>()) Diag(NewVD->getLocation(), diag::warn_attribute_weak_on_local); bool isIllegalVLA = T->isVariableArrayType() && NewVD->hasGlobalStorage(); |