aboutsummaryrefslogtreecommitdiff
path: root/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2008-01-04 23:23:46 +0000
committerFariborz Jahanian <fjahanian@apple.com>2008-01-04 23:23:46 +0000
commitbdd15f701fe98f77b1b8ddb3f4a5c0d83bb8fa9c (patch)
tree7619d720ff87d8d5247c2478c6366af2bb46887f /Parse/ParseDecl.cpp
parent773a310030b50b622eb6c5150497989eff2f5afa (diff)
Added a comment, minor refactoring of foreach parsing code per Chris's suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45601 91177308-0d34-0410-b5e6-96231b3b80d8
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);
}