diff options
author | Mike Stump <mrs@apple.com> | 2009-05-01 23:41:47 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-05-01 23:41:47 +0000 |
commit | c975bb04da88323fded43e71ff1839e8640fe878 (patch) | |
tree | 52856c5ae7651f7f145393fea68e11b18bae4b26 /lib/Sema/SemaDecl.cpp | |
parent | 956a37dd8360054247b9b10615697e80bdda8741 (diff) |
Add Sema checking for __block on vm declarations. Radar 6441502
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70601 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index af27229b92..3ae2ba14c9 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -1916,6 +1916,11 @@ void Sema::CheckVariableDeclaration(VarDecl *NewVD, NamedDecl *PrevDecl, return NewVD->setInvalidDecl(); } + if (isVM && NewVD->hasAttr<BlocksAttr>()) { + Diag(NewVD->getLocation(), diag::err_block_on_vm); + return NewVD->setInvalidDecl(); + } + if (PrevDecl) { Redeclaration = true; MergeVarDecl(NewVD, PrevDecl); |