aboutsummaryrefslogtreecommitdiff
path: root/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Parse/ParseDecl.cpp')
-rw-r--r--Parse/ParseDecl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Parse/ParseDecl.cpp b/Parse/ParseDecl.cpp
index dccc00e671..99be5caf3f 100644
--- a/Parse/ParseDecl.cpp
+++ b/Parse/ParseDecl.cpp
@@ -296,6 +296,9 @@ ParseInitDeclaratorListAfterFirstDeclarator(Declarator &D) {
ConsumeToken();
return Actions.FinalizeDeclaratorGroup(CurScope, LastDeclInGroup);
}
+ // If this is an ObjC2 for-each loop, this is a successful declarator
+ // parse. The syntax for these looks like:
+ // 'for' '(' declaration 'in' expr ')' statement
if (D.getContext() == Declarator::ForContext && isTokIdentifier_in()) {
return Actions.FinalizeDeclaratorGroup(CurScope, LastDeclInGroup);
}