summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-10-15 04:57:14 +0000
committerJohn McCall <rjmccall@apple.com>2010-10-15 04:57:14 +0000
commit1c9c3fd50a05147d9e14d12bb42910eda831a373 (patch)
tree39b38a9bec19df6fba6eb4e12fa19145ee375962 /clang/lib/Sema
parent3b1db392fcbacfafbbb2af919927792647e75c70 (diff)
downloadbcm5719-llvm-1c9c3fd50a05147d9e14d12bb42910eda831a373.tar.gz
bcm5719-llvm-1c9c3fd50a05147d9e14d12bb42910eda831a373.zip
Death to blocks, or at least the word "block" in one particular obnoxiously
ambiguous context. llvm-svn: 116567
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp4
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp2
-rw-r--r--clang/lib/Sema/SemaStmt.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 4a834cd5601..bced4a0b8cf 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -4239,7 +4239,7 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {
// Get the decls type and save a reference for later, since
// CheckInitializerTypes may change it.
QualType DclT = VDecl->getType(), SavT = DclT;
- if (VDecl->isBlockVarDecl()) {
+ if (VDecl->isLocalVarDecl()) {
if (VDecl->hasExternalStorage()) { // C99 6.7.8p5
Diag(VDecl->getLocation(), diag::err_block_extern_cant_init);
VDecl->setInvalidDecl();
@@ -4478,7 +4478,7 @@ void Sema::ActOnUninitializedDecl(Decl *RealDecl,
// Block scope. C99 6.7p7: If an identifier for an object is
// declared with no linkage (C99 6.2.2p6), the type for the
// object shall be complete.
- if (!Type->isDependentType() && Var->isBlockVarDecl() &&
+ if (!Type->isDependentType() && Var->isLocalVarDecl() &&
!Var->getLinkage() && !Var->isInvalidDecl() &&
RequireCompleteType(Var->getLocation(), Type,
diag::err_typecheck_decl_incomplete_type))
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index ee0b172ee61..14d746acb79 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -90,7 +90,7 @@ namespace {
// C++ [dcl.fct.default]p7
// Local variables shall not be used in default argument
// expressions.
- if (VDecl->isBlockVarDecl())
+ if (VDecl->isLocalVarDecl())
return S->Diag(DRE->getSourceRange().getBegin(),
diag::err_param_default_argument_references_local)
<< VDecl->getDeclName() << DefaultArg->getSourceRange();
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp
index fd196af198c..ddee9cca6d6 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/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 {
OpenPOWER on IntegriCloud