diff options
author | John McCall <rjmccall@apple.com> | 2010-10-15 04:57:14 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-10-15 04:57:14 +0000 |
commit | b6bbcc9995186799a60ce17d0c1acff31601653a (patch) | |
tree | b77c28179567896d71c528c70ae0d2837496c9e3 /lib/Sema/SemaStmt.cpp | |
parent | 66c42d443982a0891ce58deb7391d641ca87adc5 (diff) |
Death to blocks, or at least the word "block" in one particular obnoxiously
ambiguous context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116567 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index fd196af198..ddee9cca6d 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -914,7 +914,7 @@ Sema::ActOnForStmt(SourceLocation ForLoc, SourceLocation LParenLoc, for (DeclStmt::decl_iterator DI=DS->decl_begin(), DE=DS->decl_end(); DI!=DE; ++DI) { VarDecl *VD = dyn_cast<VarDecl>(*DI); - if (VD && VD->isBlockVarDecl() && !VD->hasLocalStorage()) + if (VD && VD->isLocalVarDecl() && !VD->hasLocalStorage()) VD = 0; if (VD == 0) Diag((*DI)->getLocation(), diag::err_non_variable_decl_in_for); @@ -962,7 +962,7 @@ Sema::ActOnObjCForCollectionStmt(SourceLocation ForLoc, // declare identifiers for objects having storage class 'auto' or // 'register'. VarDecl *VD = cast<VarDecl>(D); - if (VD->isBlockVarDecl() && !VD->hasLocalStorage()) + if (VD->isLocalVarDecl() && !VD->hasLocalStorage()) return StmtError(Diag(VD->getLocation(), diag::err_non_variable_decl_in_for)); } else { |