diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2007-10-31 21:59:43 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2007-10-31 21:59:43 +0000 |
commit | 19d74e1494fe399f0e2a94e9419c095f8214851b (patch) | |
tree | 071e9d42118902ae072cfc4b2e26f97577a7275c /Parse/ParseObjc.cpp | |
parent | 9544ff2d96a5630b4219bbda41bb7476f01d9bf1 (diff) |
More infrastructure to recognize objective-c's type qualifiers (in,inout, etc.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43580 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Parse/ParseObjc.cpp')
-rw-r--r-- | Parse/ParseObjc.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/Parse/ParseObjc.cpp b/Parse/ParseObjc.cpp index ea48704c01..579c48cf45 100644 --- a/Parse/ParseObjc.cpp +++ b/Parse/ParseObjc.cpp @@ -451,18 +451,6 @@ IdentifierInfo *Parser::ParseObjCSelector(SourceLocation &SelectorLoc) { } } -/// objc-type-qualifier: one of -/// in out inout bycopy byref oneway -/// -bool Parser::isObjCTypeQualifier() { - if (Tok.is(tok::identifier)) { - const IdentifierInfo *II = Tok.getIdentifierInfo(); - for (unsigned i = 0; i < objc_NumQuals; ++i) - if (II == ObjcTypeQuals[i]) return true; - } - return false; -} - /// property-attrlist: one of /// readonly getter setter assign retain copy nonatomic /// @@ -489,8 +477,9 @@ Parser::TypeTy *Parser::ParseObjCTypeName() { SourceLocation LParenLoc = ConsumeParen(), RParenLoc; TypeTy *Ty = 0; - while (isObjCTypeQualifier()) - ConsumeToken(); + // Parse type qualifiers, in, inout, etc. + ObjcDeclSpec DS; + ParseObjcTypeQualifierList(DS); if (isTypeSpecifierQualifier()) { Ty = ParseTypeName(); |