aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 8a297ac1d7..80b33f2087 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -354,7 +354,12 @@ Sema::ExprResult Sema::ActOnIdentifierExpr(Scope *S, SourceLocation Loc,
return new PredefinedExpr(Loc, T, PredefinedExpr::ObjCSuper);
}
}
-
+ // If we are parsing a block, check the block parameter list.
+ if (CurBlock) {
+ for (unsigned i = 0, e = CurBlock->Params.size(); i != e; ++i)
+ if (CurBlock->Params[i]->getIdentifier() == &II)
+ D = CurBlock->Params[i];
+ }
if (D == 0) {
// Otherwise, this could be an implicitly declared function reference (legal
// in C90, extension in C99).