]> granicus.if.org Git - clang/commitdiff
Wherever a type is used/returned from the Action module, use TypeTy instead of DeclTy...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 1 Aug 2008 10:35:27 +0000 (10:35 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 1 Aug 2008 10:35:27 +0000 (10:35 +0000)
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54265 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Parse/Action.h
include/clang/Parse/DeclSpec.h
lib/Parse/DeclSpec.cpp
lib/Parse/MinimalAction.cpp
lib/Parse/ParseDecl.cpp
lib/Parse/ParseDeclCXX.cpp
lib/Sema/Sema.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp

index b97aac1145683810813fca277e657dcded5529a0..b329306518c2892ab9e02ce804443d8e201c54db 100644 (file)
@@ -96,7 +96,7 @@ public:
   
   /// isTypeName - Return non-null if the specified identifier is a typedef name
   /// in the current scope.
-  virtual DeclTy *isTypeName(const IdentifierInfo &II, Scope *S) = 0;
+  virtual TypeTy *isTypeName(const IdentifierInfo &II, Scope *S) = 0;
   
   /// ActOnDeclarator - This callback is invoked when a declarator is parsed and
   /// 'Init' specifies the initializer if any.  This is for things like:
@@ -583,7 +583,7 @@ public:
   /// ActOnBaseSpecifier - Parsed a base specifier
   virtual void ActOnBaseSpecifier(DeclTy *classdecl, SourceRange SpecifierRange,
                                   bool Virtual, AccessSpecifier Access,
-                                  DeclTy *basetype, SourceLocation BaseLoc) {
+                                  TypeTy *basetype, SourceLocation BaseLoc) {
   }
 
   /// ActOnStartCXXClassDef - This is called at the start of a class/struct/union
@@ -829,7 +829,7 @@ public:
   
   /// isTypeName - This looks at the IdentifierInfo::FETokenInfo field to
   /// determine whether the name is a typedef or not in this scope.
-  virtual DeclTy *isTypeName(const IdentifierInfo &II, Scope *S);
+  virtual TypeTy *isTypeName(const IdentifierInfo &II, Scope *S);
   
   /// ActOnDeclarator - If this is a typedef declarator, we modify the
   /// IdentifierInfo::FETokenInfo field to keep track of this fact, until S is
index d45f6011ecb2a8b840d52f751fc80e5d4aa3e84c..68509145b9f555516d93107928cd7254ff3c9b01 100644 (file)
@@ -118,7 +118,7 @@ private:
   /// TypeRep - This contains action-specific information about a specific TST.
   /// For example, for a typedef or struct, it might contain the declaration for
   /// these.
-  void *TypeRep;  
+  Action::TypeTy *TypeRep;  
   
   // attributes.
   AttributeList *AttrList;
@@ -242,7 +242,7 @@ public:
   bool SetTypeSpecComplex(TSC C, SourceLocation Loc, const char *&PrevSpec);
   bool SetTypeSpecSign(TSS S, SourceLocation Loc, const char *&PrevSpec);
   bool SetTypeSpecType(TST T, SourceLocation Loc, const char *&PrevSpec,
-                       void *TypeRep = 0);
+                       Action::TypeTy *TypeRep = 0);
   
   bool SetTypeQual(TQ T, SourceLocation Loc, const char *&PrevSpec,
                    const LangOptions &Lang);
index 887839eb61635f2aa235f819efbba4670b55f28a..8e6dacb761d3914265f3e90e3cdd687660ca8386 100644 (file)
@@ -173,7 +173,7 @@ bool DeclSpec::SetTypeSpecSign(TSS S, SourceLocation Loc,
 }
 
 bool DeclSpec::SetTypeSpecType(TST T, SourceLocation Loc,
-                               const char *&PrevSpec, void *Rep) {
+                               const char *&PrevSpec, Action::TypeTy *Rep) {
   if (TypeSpecType != TST_unspecified)
     return BadSpecifier( (TST)TypeSpecType, PrevSpec);
   TypeSpecType = T;
index aa886ab458794122c5bd57abcf7923e92222c574..d895ccf22a078431e8c3b5211da86b4e964aa8a1 100644 (file)
@@ -51,7 +51,7 @@ void MinimalAction:: ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) {
 /// isTypeName - This looks at the IdentifierInfo::FETokenInfo field to
 /// determine whether the name is a type name (objc class name or typedef) or
 /// not in this scope.
-Action::DeclTy *
+Action::TypeTy *
 MinimalAction::isTypeName(const IdentifierInfo &II, Scope *S) {
   if (TypeNameInfo *TI = II.getFETokenInfo<TypeNameInfo>())
     if (TI->isTypeName)
index f66bb99962e5d9565ba252ed6ede79f9b48cd58f..81cb0ce627169c7250c78e6d8248c3c42664f092 100644 (file)
@@ -411,7 +411,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS) {
         goto DoneWithDeclSpec;
       
       // It has to be available as a typedef too!
-      void *TypeRep = Actions.isTypeName(*Tok.getIdentifierInfo(), CurScope);
+      TypeTy *TypeRep = Actions.isTypeName(*Tok.getIdentifierInfo(), CurScope);
       if (TypeRep == 0)
         goto DoneWithDeclSpec;
       
index 87dcdfcb64a5337a5fc9103c29a5bc6628d5ebd4..2d885ce701fd42062735833b611443ba3d67dbd8 100644 (file)
@@ -322,7 +322,7 @@ bool Parser::ParseBaseSpecifier(DeclTy *ClassDecl)
   }
 
   // We have an identifier; check whether it is actually a type.
-  DeclTy *BaseType = Actions.isTypeName(*Tok.getIdentifierInfo(), CurScope);
+  TypeTy *BaseType = Actions.isTypeName(*Tok.getIdentifierInfo(), CurScope);
   if (!BaseType) {
     Diag(Tok.getLocation(), diag::err_expected_class_name);
     return true;
index 09d8d793cbfd186ffbc7edd32057958b6b44ff36..0fda782fcb0c897f7a9256f7f4b00bd811a0362b 100644 (file)
@@ -210,7 +210,7 @@ private:
   //===--------------------------------------------------------------------===//
   // Symbol table / Decl tracking callbacks: SemaDecl.cpp.
   //
-  virtual DeclTy *isTypeName(const IdentifierInfo &II, Scope *S);
+  virtual TypeTy *isTypeName(const IdentifierInfo &II, Scope *S);
   virtual DeclTy *ActOnDeclarator(Scope *S, Declarator &D, DeclTy *LastInGroup);
   virtual DeclTy *ActOnParamDeclarator(Scope *S, Declarator &D);
   virtual void ActOnParamDefaultArgument(DeclTy *param, 
@@ -587,7 +587,7 @@ public:
   /// ActOnBaseSpecifier - Parsed a base specifier
   virtual void ActOnBaseSpecifier(DeclTy *classdecl, SourceRange SpecifierRange,
                                   bool Virtual, AccessSpecifier Access,
-                                  DeclTy *basetype, SourceLocation BaseLoc);
+                                  TypeTy *basetype, SourceLocation BaseLoc);
   
   virtual void ActOnStartCXXClassDef(Scope *S, DeclTy *TagDecl,
                                      SourceLocation LBrace);
index e046ee9a66b2d67519c53172b2eb22fc75d4e07a..f8835ffa8cbdecbda42c9f9fe7d14df9474c583a 100644 (file)
@@ -35,7 +35,7 @@
 #include "llvm/ADT/DenseSet.h"
 using namespace clang;
 
-Sema::DeclTy *Sema::isTypeName(const IdentifierInfo &II, Scope *S) {
+Sema::TypeTy *Sema::isTypeName(const IdentifierInfo &II, Scope *S) {
   Decl *IIDecl = LookupDecl(&II, Decl::IDNS_Ordinary, S, false);
 
   if (IIDecl && (isa<TypedefDecl>(IIDecl) || 
index b9a061b0112d655b51f653d236dd1cbbac9e0452..9dc62dcc4ab8bae6c44a895d8dcf9d0bfa762652 100644 (file)
@@ -264,7 +264,7 @@ void Sema::CheckCXXDefaultArguments(FunctionDecl *FD) {
 /// 'public bar' and 'virtual private baz' are each base-specifiers.
 void Sema::ActOnBaseSpecifier(DeclTy *classdecl, SourceRange SpecifierRange,
                               bool Virtual, AccessSpecifier Access,
-                              DeclTy *basetype, SourceLocation BaseLoc) {
+                              TypeTy *basetype, SourceLocation BaseLoc) {
   RecordDecl *Decl = (RecordDecl*)classdecl;
   QualType BaseType = Context.getTypeDeclType((TypeDecl*)basetype);