/// 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:
/// 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
/// 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
/// 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;
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);
}
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;
/// 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)
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;
}
// 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;
//===--------------------------------------------------------------------===//
// 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,
/// 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);
#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) ||
/// '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);