[cfe-commits] r63226 - in /cfe/trunk: docs/InternalsManual.html include/clang/Parse/Action.h include/clang/Parse/Parser.h lib/Parse/MinimalAction.cpp lib/Parse/ParseDecl.cpp lib/Parse/ParseDeclCXX.cpp lib/Parse/Parser.cpp lib/Sema/Sema.h lib/Sema/SemaDecl.cpp lib/Sema/SemaDeclCXX.cpp

Steve Naroff snaroff at apple.com
Wed Jan 28 11:39:02 PST 2009


Author: snaroff
Date: Wed Jan 28 13:39:02 2009
New Revision: 63226

URL: http://llvm.org/viewvc/llvm-project?rev=63226&view=rev
Log:
Name change (isTypeName->getTypeName).
Since it doesn't return a bool, is shouldn't be prefixed with 'is'.

Modified:
    cfe/trunk/docs/InternalsManual.html
    cfe/trunk/include/clang/Parse/Action.h
    cfe/trunk/include/clang/Parse/Parser.h
    cfe/trunk/lib/Parse/MinimalAction.cpp
    cfe/trunk/lib/Parse/ParseDecl.cpp
    cfe/trunk/lib/Parse/ParseDeclCXX.cpp
    cfe/trunk/lib/Parse/Parser.cpp
    cfe/trunk/lib/Sema/Sema.h
    cfe/trunk/lib/Sema/SemaDecl.cpp
    cfe/trunk/lib/Sema/SemaDeclCXX.cpp

Modified: cfe/trunk/docs/InternalsManual.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/InternalsManual.html?rev=63226&r1=63225&r2=63226&view=diff

==============================================================================
--- cfe/trunk/docs/InternalsManual.html (original)
+++ cfe/trunk/docs/InternalsManual.html Wed Jan 28 13:39:02 2009
@@ -600,7 +600,7 @@
 <ol>
 <li><b>tok::annot_typename</b>: This annotation token represents a
 resolved typename token that is potentially qualified.  The AnnotationValue
-field contains a pointer returned by Action::isTypeName().  In the case of the
+field contains a pointer returned by Action::getTypeName().  In the case of the
 Sema actions module, this is a <tt>Decl*</tt> for the type.</li>
 
 <li><b>tok::annot_cxxscope</b>: This annotation token represents a C++ scope

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

==============================================================================
--- cfe/trunk/include/clang/Parse/Action.h (original)
+++ cfe/trunk/include/clang/Parse/Action.h Wed Jan 28 13:39:02 2009
@@ -54,7 +54,7 @@
 /// the parser has just done or is about to do when the method is called.  They
 /// are not requests that the actions module do the specified action.
 ///
-/// All of the methods here are optional except isTypeName() and
+/// All of the methods here are optional except getTypeName() and
 /// isCurrentClassName(), which must be specified in order for the
 /// parse to complete accurately.  The MinimalAction class does this
 /// bare-minimum of tracking to implement this functionality.
@@ -130,12 +130,12 @@
   // Declaration Tracking Callbacks.
   //===--------------------------------------------------------------------===//
   
-  /// isTypeName - Return non-null if the specified identifier is a type name
+  /// getTypeName - Return non-null if the specified identifier is a type name
   /// in the current scope.
   /// An optional CXXScopeSpec can be passed to indicate the C++ scope (class or
   /// namespace) that the identifier must be a member of.
   /// i.e. for "foo::bar", 'II' will be "bar" and 'SS' will be "foo::".
-  virtual TypeTy *isTypeName(IdentifierInfo &II, Scope *S,
+  virtual TypeTy *getTypeName(IdentifierInfo &II, Scope *S,
                              const CXXScopeSpec *SS = 0) = 0;
 
   /// isCurrentClassName - Return true if the specified name is the
@@ -1326,10 +1326,10 @@
   MinimalAction(Preprocessor &pp);
   ~MinimalAction();
 
-  /// isTypeName - This looks at the IdentifierInfo::FETokenInfo field to
+  /// getTypeName - This looks at the IdentifierInfo::FETokenInfo field to
   /// determine whether the name is a typedef or not in this scope.
-  virtual TypeTy *isTypeName(IdentifierInfo &II, Scope *S,
-                             const CXXScopeSpec *SS);
+  virtual TypeTy *getTypeName(IdentifierInfo &II, Scope *S,
+                              const CXXScopeSpec *SS);
 
   /// isCurrentClassName - Always returns false, because MinimalAction
   /// does not support C++ classes with constructors.

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

==============================================================================
--- cfe/trunk/include/clang/Parse/Parser.h (original)
+++ cfe/trunk/include/clang/Parse/Parser.h Wed Jan 28 13:39:02 2009
@@ -693,7 +693,7 @@
       return false;
     
     IdentifierInfo *II = Tok.getIdentifierInfo();
-    if (Actions.isTypeName(*II, CurScope))
+    if (Actions.getTypeName(*II, CurScope))
       return true;
     
     return II == Ident_super;

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

==============================================================================
--- cfe/trunk/lib/Parse/MinimalAction.cpp (original)
+++ cfe/trunk/lib/Parse/MinimalAction.cpp Wed Jan 28 13:39:02 2009
@@ -80,8 +80,8 @@
 ///
 /// FIXME: Use the passed CXXScopeSpec for accurate C++ type checking.
 Action::TypeTy *
-MinimalAction::isTypeName(IdentifierInfo &II, Scope *S,
-                          const CXXScopeSpec *SS) {
+MinimalAction::getTypeName(IdentifierInfo &II, Scope *S,
+                           const CXXScopeSpec *SS) {
   if (TypeNameInfo *TI = II.getFETokenInfo<TypeNameInfo>())
     if (TI->isTypeName)
       return TI;

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

==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Wed Jan 28 13:39:02 2009
@@ -484,8 +484,8 @@
           GetLookAheadToken(2).is(tok::l_paren))
         goto DoneWithDeclSpec;
 
-      TypeTy *TypeRep = Actions.isTypeName(*NextToken().getIdentifierInfo(),
-                                           CurScope, &SS);
+      TypeTy *TypeRep = Actions.getTypeName(*NextToken().getIdentifierInfo(),
+                                            CurScope, &SS);
       if (TypeRep == 0)
         goto DoneWithDeclSpec;
 
@@ -538,7 +538,7 @@
         goto DoneWithDeclSpec;
       
       // It has to be available as a typedef too!
-      TypeTy *TypeRep = Actions.isTypeName(*Tok.getIdentifierInfo(), CurScope);
+      TypeTy *TypeRep = Actions.getTypeName(*Tok.getIdentifierInfo(), CurScope);
       if (TypeRep == 0)
         goto DoneWithDeclSpec;
       
@@ -1736,8 +1736,8 @@
         // If this identifier is the name of the current class, it's a
         // constructor name. 
         else if (Actions.isCurrentClassName(*Tok.getIdentifierInfo(), CurScope))
-          D.setConstructor(Actions.isTypeName(*Tok.getIdentifierInfo(),
-                                              CurScope),
+          D.setConstructor(Actions.getTypeName(*Tok.getIdentifierInfo(),
+                                               CurScope),
                            Tok.getLocation());
         // This is a normal identifier.
         else
@@ -1994,7 +1994,7 @@
   // K&R-style function:  void foo(a,b,c)
   if (!getLang().CPlusPlus && Tok.is(tok::identifier)) {
 
-    TypeTy *TypeRep = Actions.isTypeName(*Tok.getIdentifierInfo(), CurScope);
+    TypeTy *TypeRep = Actions.getTypeName(*Tok.getIdentifierInfo(), CurScope);
     if (TypeRep) {
       // This is a typename. Replace the current token in-place with an
       // annotation type token.
@@ -2203,7 +2203,7 @@
     IdentifierInfo *ParmII = Tok.getIdentifierInfo();
 
     // Reject 'typedef int y; int test(x, y)', but continue parsing.
-    if (Actions.isTypeName(*ParmII, CurScope))
+    if (Actions.getTypeName(*ParmII, CurScope))
       Diag(Tok, diag::err_unexpected_typedef_ident) << ParmII;
     
     // Verify that the argument identifier has not already been mentioned.

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

==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Wed Jan 28 13:39:02 2009
@@ -232,7 +232,7 @@
   }
 
   // We have an identifier; check whether it is actually a type.
-  TypeTy *Type = Actions.isTypeName(*Tok.getIdentifierInfo(), CurScope, SS);
+  TypeTy *Type = Actions.getTypeName(*Tok.getIdentifierInfo(), CurScope, SS);
   if (!Type) {
     Diag(Tok, diag::err_expected_class_name);
     return 0;

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

==============================================================================
--- cfe/trunk/lib/Parse/Parser.cpp (original)
+++ cfe/trunk/lib/Parse/Parser.cpp Wed Jan 28 13:39:02 2009
@@ -737,7 +737,7 @@
 /// inside expressions to be treated as typenames so it will not be called
 /// for expressions in C.
 /// The benefit for C/ObjC is that a typename will be annotated and
-/// Actions.isTypeName will not be needed to be called again (e.g. isTypeName
+/// Actions.getTypeName will not be needed to be called again (e.g. getTypeName
 /// will not be called twice, once to check whether we have a declaration
 /// specifier, and another one to get the actual type inside
 /// ParseDeclarationSpecifiers).
@@ -757,8 +757,8 @@
 
   if (Tok.is(tok::identifier)) {
     // Determine whether the identifier is a type name.
-    if (TypeTy *Ty = Actions.isTypeName(*Tok.getIdentifierInfo(), 
-                                        CurScope, &SS)) {
+    if (TypeTy *Ty = Actions.getTypeName(*Tok.getIdentifierInfo(), 
+                                         CurScope, &SS)) {
       // This is a typename. Replace the current token in-place with an
       // annotation type token.
       Tok.setKind(tok::annot_typename);

Modified: cfe/trunk/lib/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.h?rev=63226&r1=63225&r2=63226&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/Sema.h (original)
+++ cfe/trunk/lib/Sema/Sema.h Wed Jan 28 13:39:02 2009
@@ -282,8 +282,8 @@
   //===--------------------------------------------------------------------===//
   // Symbol table / Decl tracking callbacks: SemaDecl.cpp.
   //
-  virtual TypeTy *isTypeName(IdentifierInfo &II, Scope *S,
-                             const CXXScopeSpec *SS);
+  virtual TypeTy *getTypeName(IdentifierInfo &II, Scope *S,
+                              const CXXScopeSpec *SS);
   virtual DeclTy *ActOnDeclarator(Scope *S, Declarator &D, DeclTy *LastInGroup) {
     return ActOnDeclarator(S, D, LastInGroup, false);
   }

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=63226&r1=63225&r2=63226&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Wed Jan 28 13:39:02 2009
@@ -31,8 +31,8 @@
 
 using namespace clang;
 
-Sema::TypeTy *Sema::isTypeName(IdentifierInfo &II, Scope *S,
-                               const CXXScopeSpec *SS) {
+Sema::TypeTy *Sema::getTypeName(IdentifierInfo &II, Scope *S,
+                                const CXXScopeSpec *SS) {
   DeclContext *DC = 0;
   if (SS) {
     if (SS->isInvalid())

Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=63226&r1=63225&r2=63226&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Wed Jan 28 13:39:02 2009
@@ -692,7 +692,7 @@
   }
 
   // It didn't name a member, so see if it names a class.
-  TypeTy *BaseTy = isTypeName(*MemberOrBase, S, 0/*SS*/);
+  TypeTy *BaseTy = getTypeName(*MemberOrBase, S, 0/*SS*/);
   if (!BaseTy)
     return Diag(IdLoc, diag::err_mem_init_not_member_or_class)
       << MemberOrBase << SourceRange(IdLoc, RParenLoc);





More information about the cfe-commits mailing list