[cfe-commits] r54265 - in /cfe/trunk: 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
Argiris Kirtzidis
akyrtzi at gmail.com
Fri Aug 1 03:35:28 PDT 2008
Author: akirtzidis
Date: Fri Aug 1 05:35:27 2008
New Revision: 54265
URL: http://llvm.org/viewvc/llvm-project?rev=54265&view=rev
Log:
Wherever a type is used/returned from the Action module, use TypeTy instead of DeclTy or void.
No functionality change.
Modified:
cfe/trunk/include/clang/Parse/Action.h
cfe/trunk/include/clang/Parse/DeclSpec.h
cfe/trunk/lib/Parse/DeclSpec.cpp
cfe/trunk/lib/Parse/MinimalAction.cpp
cfe/trunk/lib/Parse/ParseDecl.cpp
cfe/trunk/lib/Parse/ParseDeclCXX.cpp
cfe/trunk/lib/Sema/Sema.h
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Modified: cfe/trunk/include/clang/Parse/Action.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Action.h?rev=54265&r1=54264&r2=54265&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/Action.h (original)
+++ cfe/trunk/include/clang/Parse/Action.h Fri Aug 1 05:35:27 2008
@@ -96,7 +96,7 @@
/// 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 @@
/// 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 @@
/// 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
Modified: cfe/trunk/include/clang/Parse/DeclSpec.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/DeclSpec.h?rev=54265&r1=54264&r2=54265&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/DeclSpec.h (original)
+++ cfe/trunk/include/clang/Parse/DeclSpec.h Fri Aug 1 05:35:27 2008
@@ -118,7 +118,7 @@
/// 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 @@
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);
Modified: cfe/trunk/lib/Parse/DeclSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/DeclSpec.cpp?rev=54265&r1=54264&r2=54265&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/DeclSpec.cpp (original)
+++ cfe/trunk/lib/Parse/DeclSpec.cpp Fri Aug 1 05:35:27 2008
@@ -173,7 +173,7 @@
}
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;
Modified: cfe/trunk/lib/Parse/MinimalAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/MinimalAction.cpp?rev=54265&r1=54264&r2=54265&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/MinimalAction.cpp (original)
+++ cfe/trunk/lib/Parse/MinimalAction.cpp Fri Aug 1 05:35:27 2008
@@ -51,7 +51,7 @@
/// 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)
Modified: cfe/trunk/lib/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=54265&r1=54264&r2=54265&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Fri Aug 1 05:35:27 2008
@@ -411,7 +411,7 @@
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;
Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=54265&r1=54264&r2=54265&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Fri Aug 1 05:35:27 2008
@@ -322,7 +322,7 @@
}
// 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;
Modified: cfe/trunk/lib/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.h?rev=54265&r1=54264&r2=54265&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.h (original)
+++ cfe/trunk/lib/Sema/Sema.h Fri Aug 1 05:35:27 2008
@@ -210,7 +210,7 @@
//===--------------------------------------------------------------------===//
// 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 @@
/// 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);
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=54265&r1=54264&r2=54265&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Fri Aug 1 05:35:27 2008
@@ -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) ||
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=54265&r1=54264&r2=54265&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Fri Aug 1 05:35:27 2008
@@ -264,7 +264,7 @@
/// '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);
More information about the cfe-commits
mailing list