diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2008-01-03 17:55:25 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2008-01-03 17:55:25 +0000 |
commit | 3ba5a0f90a03d5e13d02cbee9abd2a1ba01b18bc (patch) | |
tree | 23f4c6f0e23087a103f1309e90cba10e7342d427 /Parse/ParseObjc.cpp | |
parent | c89bf69c9289d2b2305f2c267daacc7312391898 (diff) |
Patch to parse/build AST ObjC2's foreach statement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45539 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Parse/ParseObjc.cpp')
-rw-r--r-- | Parse/ParseObjc.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Parse/ParseObjc.cpp b/Parse/ParseObjc.cpp index e661e8775b..c17e35e6f4 100644 --- a/Parse/ParseObjc.cpp +++ b/Parse/ParseObjc.cpp @@ -494,7 +494,10 @@ bool Parser::isObjCPropertyAttribute() { /// objc-for-collection-in: 'in' /// bool Parser::isObjCForCollectionInKW() { - if (Tok.is(tok::identifier)) { + // FIXME: May have to do additional look-ahead to only allow for + // valid tokens following an 'in'; such as an identifier, unary operators, + // '[' etc. + if (getLang().ObjC2 && Tok.is(tok::identifier)) { const IdentifierInfo *II = Tok.getIdentifierInfo(); return II == ObjCForCollectionInKW; } |