[cfe-commits] r68867 - in /cfe/trunk: include/clang/Parse/Parser.h lib/Parse/ParseObjc.cpp

Chris Lattner sabre at nondot.org
Sat Apr 11 11:13:45 PDT 2009


Author: lattner
Date: Sat Apr 11 13:13:45 2009
New Revision: 68867

URL: http://llvm.org/viewvc/llvm-project?rev=68867&view=rev
Log:
rename Parser::ParseObjCSelector -> Parser::ParseObjCSelectorPiece,
since it only parses one identifier out of the selector, not the 
whole thing.

Modified:
    cfe/trunk/include/clang/Parse/Parser.h
    cfe/trunk/lib/Parse/ParseObjc.cpp

Modified: cfe/trunk/include/clang/Parse/Parser.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=68867&r1=68866&r2=68867&view=diff

==============================================================================
--- cfe/trunk/include/clang/Parse/Parser.h (original)
+++ cfe/trunk/include/clang/Parse/Parser.h Sat Apr 11 13:13:45 2009
@@ -584,7 +584,7 @@
   DeclPtrTy ParseObjCPropertySynthesize(SourceLocation atLoc);
   DeclPtrTy ParseObjCPropertyDynamic(SourceLocation atLoc);
   
-  IdentifierInfo *ParseObjCSelector(SourceLocation &MethodLocation);
+  IdentifierInfo *ParseObjCSelectorPiece(SourceLocation &MethodLocation);
   // Definitions for Objective-c context sensitive keywords recognition.
   enum ObjCTypeQual {
     objc_in=0, objc_out, objc_inout, objc_oneway, objc_bycopy, objc_byref,

Modified: cfe/trunk/lib/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseObjc.cpp?rev=68867&r1=68866&r2=68867&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/lib/Parse/ParseObjc.cpp Sat Apr 11 13:13:45 2009
@@ -477,7 +477,7 @@
 ///       unsigned long const short volatile signed restrict _Complex
 ///       in out inout bycopy byref oneway int char float double void _Bool
 ///
-IdentifierInfo *Parser::ParseObjCSelector(SourceLocation &SelectorLoc) {
+IdentifierInfo *Parser::ParseObjCSelectorPiece(SourceLocation &SelectorLoc) {
   switch (Tok.getKind()) {
   default:
     return 0;
@@ -678,7 +678,7 @@
     ReturnType = ParseObjCTypeName(DSRet);
   
   SourceLocation selLoc;
-  IdentifierInfo *SelIdent = ParseObjCSelector(selLoc);
+  IdentifierInfo *SelIdent = ParseObjCSelectorPiece(selLoc);
 
   // An unnamed colon is valid.
   if (!SelIdent && Tok.isNot(tok::colon)) { // missing selector name.
@@ -739,7 +739,7 @@
     
     // Check for another keyword selector.
     SourceLocation Loc;
-    SelIdent = ParseObjCSelector(Loc);
+    SelIdent = ParseObjCSelectorPiece(Loc);
     if (!SelIdent && Tok.isNot(tok::colon))
       break;
     // We have a selector or a colon, continue parsing.
@@ -1494,7 +1494,7 @@
                                        ExprArg ReceiverExpr) {
   // Parse objc-selector
   SourceLocation Loc;
-  IdentifierInfo *selIdent = ParseObjCSelector(Loc);
+  IdentifierInfo *selIdent = ParseObjCSelectorPiece(Loc);
 
   SourceLocation SelectorLoc = Loc;
     
@@ -1530,7 +1530,7 @@
       KeyExprs.push_back(Res.release());
 
       // Check for another keyword selector.
-      selIdent = ParseObjCSelector(Loc);
+      selIdent = ParseObjCSelectorPiece(Loc);
       if (!selIdent && Tok.isNot(tok::colon))
         break;
       // We have a selector or a colon, continue parsing.
@@ -1677,7 +1677,7 @@
   llvm::SmallVector<IdentifierInfo *, 12> KeyIdents;
   SourceLocation LParenLoc = ConsumeParen();
   SourceLocation sLoc;
-  IdentifierInfo *SelIdent = ParseObjCSelector(sLoc);
+  IdentifierInfo *SelIdent = ParseObjCSelectorPiece(sLoc);
   if (!SelIdent && Tok.isNot(tok::colon)) // missing selector name.
     return ExprError(Diag(Tok, diag::err_expected_ident));
 
@@ -1694,7 +1694,7 @@
         break;
       // Check for another keyword selector.
       SourceLocation Loc;
-      SelIdent = ParseObjCSelector(Loc);
+      SelIdent = ParseObjCSelectorPiece(Loc);
       KeyIdents.push_back(SelIdent);
       if (!SelIdent && Tok.isNot(tok::colon))
         break;





More information about the cfe-commits mailing list