[cfe-commits] r55217 - in /cfe/trunk: include/clang/Parse/Parser.h lib/Parse/ParseObjc.cpp lib/Parse/Parser.cpp
Chris Lattner
sabre at nondot.org
Fri Aug 22 19:02:24 PDT 2008
Author: lattner
Date: Fri Aug 22 21:02:23 2008
New Revision: 55217
URL: http://llvm.org/viewvc/llvm-project?rev=55217&view=rev
Log:
we already have a handle on the 'in' keyword, don't bother getting two.
Modified:
cfe/trunk/include/clang/Parse/Parser.h
cfe/trunk/lib/Parse/ParseObjc.cpp
cfe/trunk/lib/Parse/Parser.cpp
Modified: cfe/trunk/include/clang/Parse/Parser.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=55217&r1=55216&r2=55217&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/Parser.h (original)
+++ cfe/trunk/include/clang/Parse/Parser.h Fri Aug 22 21:02:23 2008
@@ -354,7 +354,6 @@
IdentifierInfo *ObjCPropertyAttrs[objc_NumAttrs];
bool isObjCPropertyAttribute();
- IdentifierInfo *ObjCForCollectionInKW;
bool isTokIdentifier_in() const;
TypeTy *ParseObjCTypeName(ObjCDeclSpec &DS);
Modified: cfe/trunk/lib/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseObjc.cpp?rev=55217&r1=55216&r2=55217&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/lib/Parse/ParseObjc.cpp Fri Aug 22 21:02:23 2008
@@ -31,26 +31,26 @@
SourceLocation AtLoc = ConsumeToken(); // the "@"
switch (Tok.getObjCKeywordID()) {
- case tok::objc_class:
- return ParseObjCAtClassDeclaration(AtLoc);
- case tok::objc_interface:
- return ParseObjCAtInterfaceDeclaration(AtLoc);
- case tok::objc_protocol:
- return ParseObjCAtProtocolDeclaration(AtLoc);
- case tok::objc_implementation:
- return ParseObjCAtImplementationDeclaration(AtLoc);
- case tok::objc_end:
- return ParseObjCAtEndDeclaration(AtLoc);
- case tok::objc_compatibility_alias:
- return ParseObjCAtAliasDeclaration(AtLoc);
- case tok::objc_synthesize:
- return ParseObjCPropertySynthesize(AtLoc);
- case tok::objc_dynamic:
- return ParseObjCPropertyDynamic(AtLoc);
- default:
- Diag(AtLoc, diag::err_unexpected_at);
- SkipUntil(tok::semi);
- return 0;
+ case tok::objc_class:
+ return ParseObjCAtClassDeclaration(AtLoc);
+ case tok::objc_interface:
+ return ParseObjCAtInterfaceDeclaration(AtLoc);
+ case tok::objc_protocol:
+ return ParseObjCAtProtocolDeclaration(AtLoc);
+ case tok::objc_implementation:
+ return ParseObjCAtImplementationDeclaration(AtLoc);
+ case tok::objc_end:
+ return ParseObjCAtEndDeclaration(AtLoc);
+ case tok::objc_compatibility_alias:
+ return ParseObjCAtAliasDeclaration(AtLoc);
+ case tok::objc_synthesize:
+ return ParseObjCPropertySynthesize(AtLoc);
+ case tok::objc_dynamic:
+ return ParseObjCPropertyDynamic(AtLoc);
+ default:
+ Diag(AtLoc, diag::err_unexpected_at);
+ SkipUntil(tok::semi);
+ return 0;
}
}
@@ -511,7 +511,7 @@
// valid tokens following an 'in'; such as an identifier, unary operators,
// '[' etc.
return (getLang().ObjC2 && Tok.is(tok::identifier) &&
- Tok.getIdentifierInfo() == ObjCForCollectionInKW);
+ Tok.getIdentifierInfo() == ObjCTypeQuals[objc_in]);
}
/// ParseObjCTypeQualifierList - This routine parses the objective-c's type
Modified: cfe/trunk/lib/Parse/Parser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/Parser.cpp?rev=55217&r1=55216&r2=55217&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/Parser.cpp (original)
+++ cfe/trunk/lib/Parse/Parser.cpp Fri Aug 22 21:02:23 2008
@@ -265,7 +265,6 @@
ObjCPropertyAttrs[objc_copy] = &PP.getIdentifierTable().get("copy");
ObjCPropertyAttrs[objc_nonatomic] =
&PP.getIdentifierTable().get("nonatomic");
- ObjCForCollectionInKW = &PP.getIdentifierTable().get("in");
}
Ident_super = &PP.getIdentifierTable().get("super");
More information about the cfe-commits
mailing list