[cfe-commits] r90743 - in /cfe/trunk: include/clang/AST/ include/clang/Frontend/ lib/AST/ lib/Frontend/ lib/Index/ lib/Sema/
steve naroff
snaroff at apple.com
Mon Dec 7 04:13:59 PST 2009
Hi John,
While 'DeclaratorInfo' might not be a perfect name, it follows
terminology in the C99 spec. From my perspective, 'TypeSourceInfo'
isn't a better name (unless it appears in the CXX spec, which I am
much less familiar with).
snaroff
On Dec 6, 2009, at 9:54 PM, John McCall wrote:
> Author: rjmccall
> Date: Sun Dec 6 20:54:59 2009
> New Revision: 90743
>
> URL: http://llvm.org/viewvc/llvm-project?rev=90743&view=rev
> Log:
> DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename
> associated variables,
> but the results are imperfect.
>
> For posterity, I did:
>
> cat <<EOF > $cmdfile
> s/DeclaratorInfo/TypeSourceInfo/g
> s/DInfo/TInfo/g
> s/TypeTypeSourceInfo/TypeSourceInfo/g
> s/SourceTypeSourceInfo/TypeSourceInfo/g
> EOF
>
> find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f
> $cmdfile '{}' \;
> find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \;
> find include -name '*.h' -not -path 'include/clang/Parse/*' -not -
> path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \;
>
>
> Modified:
> cfe/trunk/include/clang/AST/ASTContext.h
> cfe/trunk/include/clang/AST/Decl.h
> cfe/trunk/include/clang/AST/DeclCXX.h
> cfe/trunk/include/clang/AST/DeclObjC.h
> cfe/trunk/include/clang/AST/DeclTemplate.h
> cfe/trunk/include/clang/AST/Expr.h
> cfe/trunk/include/clang/AST/TemplateBase.h
> cfe/trunk/include/clang/AST/TypeLoc.h
> cfe/trunk/include/clang/AST/TypeLocBuilder.h
> cfe/trunk/include/clang/Frontend/PCHReader.h
> cfe/trunk/include/clang/Frontend/PCHWriter.h
> cfe/trunk/lib/AST/ASTContext.cpp
> cfe/trunk/lib/AST/Decl.cpp
> cfe/trunk/lib/AST/DeclCXX.cpp
> cfe/trunk/lib/AST/DeclObjC.cpp
> cfe/trunk/lib/AST/DeclTemplate.cpp
> cfe/trunk/lib/AST/TemplateBase.cpp
> cfe/trunk/lib/Frontend/PCHReader.cpp
> cfe/trunk/lib/Frontend/PCHReaderDecl.cpp
> cfe/trunk/lib/Frontend/PCHReaderStmt.cpp
> cfe/trunk/lib/Frontend/PCHWriter.cpp
> cfe/trunk/lib/Frontend/PCHWriterDecl.cpp
> cfe/trunk/lib/Frontend/PCHWriterStmt.cpp
> cfe/trunk/lib/Frontend/RewriteObjC.cpp
> cfe/trunk/lib/Index/ASTVisitor.h
> cfe/trunk/lib/Index/ResolveLocation.cpp
> cfe/trunk/lib/Sema/Sema.cpp
> cfe/trunk/lib/Sema/Sema.h
> cfe/trunk/lib/Sema/SemaDecl.cpp
> cfe/trunk/lib/Sema/SemaDeclAttr.cpp
> cfe/trunk/lib/Sema/SemaDeclCXX.cpp
> cfe/trunk/lib/Sema/SemaDeclObjC.cpp
> cfe/trunk/lib/Sema/SemaExpr.cpp
> cfe/trunk/lib/Sema/SemaExprCXX.cpp
> cfe/trunk/lib/Sema/SemaTemplate.cpp
> cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp
> cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
> cfe/trunk/lib/Sema/SemaType.cpp
> cfe/trunk/lib/Sema/TreeTransform.h
>
> Modified: cfe/trunk/include/clang/AST/ASTContext.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/include/clang/AST/ASTContext.h (original)
> +++ cfe/trunk/include/clang/AST/ASTContext.h Sun Dec 6 20:54:59 2009
> @@ -1117,9 +1117,9 @@
> void setObjCImplementation(ObjCCategoryDecl *CatD,
> ObjCCategoryImplDecl *ImplD);
>
> - /// \brief Allocate an uninitialized DeclaratorInfo.
> + /// \brief Allocate an uninitialized TypeSourceInfo.
> ///
> - /// The caller should initialize the memory held by
> DeclaratorInfo using
> + /// The caller should initialize the memory held by
> TypeSourceInfo using
> /// the TypeLoc wrappers.
> ///
> /// \param T the type that will be the basis for type source info.
> This type
> @@ -1128,13 +1128,13 @@
> ///
> /// \param Size the size of the type info to create, or 0 if the
> size
> /// should be calculated based on the type.
> - DeclaratorInfo *CreateDeclaratorInfo(QualType T, unsigned Size =
> 0);
> + TypeSourceInfo *CreateTypeSourceInfo(QualType T, unsigned Size =
> 0);
>
> - /// \brief Allocate a DeclaratorInfo where all locations have been
> + /// \brief Allocate a TypeSourceInfo where all locations have been
> /// initialized to a given location, which defaults to the empty
> /// location.
> - DeclaratorInfo *
> - getTrivialDeclaratorInfo(QualType T, SourceLocation Loc =
> SourceLocation());
> + TypeSourceInfo *
> + getTrivialTypeSourceInfo(QualType T, SourceLocation Loc =
> SourceLocation());
>
> private:
> ASTContext(const ASTContext&); // DO NOT IMPLEMENT
>
> Modified: cfe/trunk/include/clang/AST/Decl.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/include/clang/AST/Decl.h (original)
> +++ cfe/trunk/include/clang/AST/Decl.h Sun Dec 6 20:54:59 2009
> @@ -35,17 +35,17 @@
> ///
> /// A client can read the relevant info using TypeLoc wrappers, e.g:
> /// @code
> -/// TypeLoc TL = DeclaratorInfo->getTypeLoc();
> +/// TypeLoc TL = TypeSourceInfo->getTypeLoc();
> /// if (PointerLoc *PL = dyn_cast<PointerLoc>(&TL))
> /// PL->getStarLoc().print(OS, SrcMgr);
> /// @endcode
> ///
> -class DeclaratorInfo {
> +class TypeSourceInfo {
> QualType Ty;
> // Contains a memory block after the class, used for type source
> information,
> // allocated by ASTContext.
> friend class ASTContext;
> - DeclaratorInfo(QualType ty) : Ty(ty) { }
> + TypeSourceInfo(QualType ty) : Ty(ty) { }
> public:
> /// \brief Return the type wrapped by this type source info.
> QualType getType() const { return Ty; }
> @@ -322,18 +322,18 @@
> };
>
> /// \brief Represents a ValueDecl that came out of a declarator.
> -/// Contains type source information through DeclaratorInfo.
> +/// Contains type source information through TypeSourceInfo.
> class DeclaratorDecl : public ValueDecl {
> - DeclaratorInfo *DeclInfo;
> + TypeSourceInfo *DeclInfo;
>
> protected:
> DeclaratorDecl(Kind DK, DeclContext *DC, SourceLocation L,
> - DeclarationName N, QualType T, DeclaratorInfo
> *DInfo)
> - : ValueDecl(DK, DC, L, N, T), DeclInfo(DInfo) {}
> + DeclarationName N, QualType T, TypeSourceInfo
> *TInfo)
> + : ValueDecl(DK, DC, L, N, T), DeclInfo(TInfo) {}
>
> public:
> - DeclaratorInfo *getDeclaratorInfo() const { return DeclInfo; }
> - void setDeclaratorInfo(DeclaratorInfo *DInfo) { DeclInfo = DInfo; }
> + TypeSourceInfo *getTypeSourceInfo() const { return DeclInfo; }
> + void setTypeSourceInfo(TypeSourceInfo *TInfo) { DeclInfo = TInfo; }
>
> SourceLocation getTypeSpecStartLoc() const;
>
> @@ -440,8 +440,8 @@
> friend class StmtIteratorBase;
> protected:
> VarDecl(Kind DK, DeclContext *DC, SourceLocation L, IdentifierInfo
> *Id,
> - QualType T, DeclaratorInfo *DInfo, StorageClass SC)
> - : DeclaratorDecl(DK, DC, L, Id, T, DInfo), Init(),
> + QualType T, TypeSourceInfo *TInfo, StorageClass SC)
> + : DeclaratorDecl(DK, DC, L, Id, T, TInfo), Init(),
> ThreadSpecified(false), HasCXXDirectInit(false),
> DeclaredInCondition(false) {
> SClass = SC;
> @@ -461,7 +461,7 @@
>
> static VarDecl *Create(ASTContext &C, DeclContext *DC,
> SourceLocation L, IdentifierInfo *Id,
> - QualType T, DeclaratorInfo *DInfo,
> StorageClass S);
> + QualType T, TypeSourceInfo *TInfo,
> StorageClass S);
>
> virtual ~VarDecl();
> virtual void Destroy(ASTContext& C);
> @@ -752,7 +752,7 @@
> protected:
> ImplicitParamDecl(Kind DK, DeclContext *DC, SourceLocation L,
> IdentifierInfo *Id, QualType Tw)
> - : VarDecl(DK, DC, L, Id, Tw, /*DInfo=*/0, VarDecl::None) {}
> + : VarDecl(DK, DC, L, Id, Tw, /*TInfo=*/0, VarDecl::None) {}
> public:
> static ImplicitParamDecl *Create(ASTContext &C, DeclContext *DC,
> SourceLocation L, IdentifierInfo
> *Id,
> @@ -779,16 +779,16 @@
>
> protected:
> ParmVarDecl(Kind DK, DeclContext *DC, SourceLocation L,
> - IdentifierInfo *Id, QualType T, DeclaratorInfo *DInfo,
> + IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo,
> StorageClass S, Expr *DefArg)
> - : VarDecl(DK, DC, L, Id, T, DInfo, S),
> objcDeclQualifier(OBJC_TQ_None) {
> + : VarDecl(DK, DC, L, Id, T, TInfo, S),
> objcDeclQualifier(OBJC_TQ_None) {
> setDefaultArg(DefArg);
> }
>
> public:
> static ParmVarDecl *Create(ASTContext &C, DeclContext *DC,
> SourceLocation L,IdentifierInfo *Id,
> - QualType T, DeclaratorInfo *DInfo,
> + QualType T, TypeSourceInfo *TInfo,
> StorageClass S, Expr *DefArg);
>
> ObjCDeclQualifier getObjCDeclQualifier() const {
> @@ -862,8 +862,8 @@
> }
>
> QualType getOriginalType() const {
> - if (getDeclaratorInfo())
> - return getDeclaratorInfo()->getType();
> + if (getTypeSourceInfo())
> + return getTypeSourceInfo()->getType();
> return getType();
> }
>
> @@ -947,9 +947,9 @@
>
> protected:
> FunctionDecl(Kind DK, DeclContext *DC, SourceLocation L,
> - DeclarationName N, QualType T, DeclaratorInfo *DInfo,
> + DeclarationName N, QualType T, TypeSourceInfo *TInfo,
> StorageClass S, bool isInline)
> - : DeclaratorDecl(DK, DC, L, N, T, DInfo),
> + : DeclaratorDecl(DK, DC, L, N, T, TInfo),
> DeclContext(DK),
> ParamInfo(0), Body(),
> SClass(S), IsInline(isInline),
> @@ -976,7 +976,7 @@
>
> static FunctionDecl *Create(ASTContext &C, DeclContext *DC,
> SourceLocation L,
> DeclarationName N, QualType T,
> - DeclaratorInfo *DInfo,
> + TypeSourceInfo *TInfo,
> StorageClass S = None, bool isInline =
> false,
> bool hasWrittenPrototype = true);
>
> @@ -1312,15 +1312,15 @@
> Expr *BitWidth;
> protected:
> FieldDecl(Kind DK, DeclContext *DC, SourceLocation L,
> - IdentifierInfo *Id, QualType T, DeclaratorInfo *DInfo,
> + IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo,
> Expr *BW, bool Mutable)
> - : DeclaratorDecl(DK, DC, L, Id, T, DInfo), Mutable(Mutable),
> BitWidth(BW) {
> + : DeclaratorDecl(DK, DC, L, Id, T, TInfo), Mutable(Mutable),
> BitWidth(BW) {
> }
>
> public:
> static FieldDecl *Create(ASTContext &C, DeclContext *DC,
> SourceLocation L,
> IdentifierInfo *Id, QualType T,
> - DeclaratorInfo *DInfo, Expr *BW, bool
> Mutable);
> + TypeSourceInfo *TInfo, Expr *BW, bool
> Mutable);
>
> /// isMutable - Determines whether this field is mutable (C++ only).
> bool isMutable() const { return Mutable; }
> @@ -1423,28 +1423,28 @@
>
> class TypedefDecl : public TypeDecl {
> /// UnderlyingType - This is the type the typedef is set to.
> - DeclaratorInfo *DInfo;
> + TypeSourceInfo *TInfo;
>
> TypedefDecl(DeclContext *DC, SourceLocation L,
> - IdentifierInfo *Id, DeclaratorInfo *DInfo)
> - : TypeDecl(Typedef, DC, L, Id), DInfo(DInfo) {}
> + IdentifierInfo *Id, TypeSourceInfo *TInfo)
> + : TypeDecl(Typedef, DC, L, Id), TInfo(TInfo) {}
>
> virtual ~TypedefDecl() {}
> public:
>
> static TypedefDecl *Create(ASTContext &C, DeclContext *DC,
> SourceLocation L, IdentifierInfo *Id,
> - DeclaratorInfo *DInfo);
> + TypeSourceInfo *TInfo);
>
> - DeclaratorInfo *getTypeDeclaratorInfo() const {
> - return DInfo;
> + TypeSourceInfo *getTypeSourceInfo() const {
> + return TInfo;
> }
>
> QualType getUnderlyingType() const {
> - return DInfo->getType();
> + return TInfo->getType();
> }
> - void setTypeDeclaratorInfo(DeclaratorInfo *newType) {
> - DInfo = newType;
> + void setTypeSourceInfo(TypeSourceInfo *newType) {
> + TInfo = newType;
> }
>
> // Implement isa/cast/dyncast/etc.
>
> Modified: cfe/trunk/include/clang/AST/DeclCXX.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/include/clang/AST/DeclCXX.h (original)
> +++ cfe/trunk/include/clang/AST/DeclCXX.h Sun Dec 6 20:54:59 2009
> @@ -804,15 +804,15 @@
> class CXXMethodDecl : public FunctionDecl {
> protected:
> CXXMethodDecl(Kind DK, CXXRecordDecl *RD, SourceLocation L,
> - DeclarationName N, QualType T, DeclaratorInfo *DInfo,
> + DeclarationName N, QualType T, TypeSourceInfo *TInfo,
> bool isStatic, bool isInline)
> - : FunctionDecl(DK, RD, L, N, T, DInfo, (isStatic ? Static :
> None),
> + : FunctionDecl(DK, RD, L, N, T, TInfo, (isStatic ? Static :
> None),
> isInline) {}
>
> public:
> static CXXMethodDecl *Create(ASTContext &C, CXXRecordDecl *RD,
> SourceLocation L, DeclarationName N,
> - QualType T, DeclaratorInfo *DInfo,
> + QualType T, TypeSourceInfo *TInfo,
> bool isStatic = false,
> bool isInline = false);
>
> @@ -894,9 +894,9 @@
> /// };
> /// @endcode
> class CXXBaseOrMemberInitializer {
> - /// \brief Either the base class name (stored as a
> DeclaratorInfo*) or the
> + /// \brief Either the base class name (stored as a
> TypeSourceInfo*) or the
> /// field being initialized.
> - llvm::PointerUnion<DeclaratorInfo *, FieldDecl *> BaseOrMember;
> + llvm::PointerUnion<TypeSourceInfo *, FieldDecl *> BaseOrMember;
>
> /// \brief The source location for the field name.
> SourceLocation MemberLocation;
> @@ -935,7 +935,7 @@
> /// CXXBaseOrMemberInitializer - Creates a new base-class
> initializer.
> explicit
> CXXBaseOrMemberInitializer(ASTContext &Context,
> - DeclaratorInfo *DInfo,
> CXXConstructorDecl *C,
> + TypeSourceInfo *TInfo,
> CXXConstructorDecl *C,
> SourceLocation L,
> Expr **Args, unsigned NumArgs,
> SourceLocation R);
> @@ -961,7 +961,7 @@
>
> /// isBaseInitializer - Returns true when this initializer is
> /// initializing a base class.
> - bool isBaseInitializer() const { return
> BaseOrMember.is<DeclaratorInfo*>(); }
> + bool isBaseInitializer() const { return
> BaseOrMember.is<TypeSourceInfo*>(); }
>
> /// isMemberInitializer - Returns true when this initializer is
> /// initializing a non-static data member.
> @@ -978,8 +978,8 @@
> Type *getBaseClass();
>
> /// \brief Returns the declarator information for a base class
> initializer.
> - DeclaratorInfo *getBaseClassInfo() const {
> - return BaseOrMember.dyn_cast<DeclaratorInfo *>();
> + TypeSourceInfo *getBaseClassInfo() const {
> + return BaseOrMember.dyn_cast<TypeSourceInfo *>();
> }
>
> /// getMember - If this is a member initializer, returns the
> @@ -1064,9 +1064,9 @@
> unsigned NumBaseOrMemberInitializers;
>
> CXXConstructorDecl(CXXRecordDecl *RD, SourceLocation L,
> - DeclarationName N, QualType T, DeclaratorInfo
> *DInfo,
> + DeclarationName N, QualType T, TypeSourceInfo
> *TInfo,
> bool isExplicit, bool isInline, bool
> isImplicitlyDeclared)
> - : CXXMethodDecl(CXXConstructor, RD, L, N, T, DInfo, false,
> isInline),
> + : CXXMethodDecl(CXXConstructor, RD, L, N, T, TInfo, false,
> isInline),
> Explicit(isExplicit), ImplicitlyDefined(false),
> BaseOrMemberInitializers(0), NumBaseOrMemberInitializers(0) {
> setImplicit(isImplicitlyDeclared);
> @@ -1076,7 +1076,7 @@
> public:
> static CXXConstructorDecl *Create(ASTContext &C, CXXRecordDecl *RD,
> SourceLocation L,
> DeclarationName N,
> - QualType T, DeclaratorInfo
> *DInfo,
> + QualType T, TypeSourceInfo
> *TInfo,
> bool isExplicit,
> bool isInline, bool
> isImplicitlyDeclared);
>
> @@ -1203,7 +1203,7 @@
> CXXDestructorDecl(CXXRecordDecl *RD, SourceLocation L,
> DeclarationName N, QualType T,
> bool isInline, bool isImplicitlyDeclared)
> - : CXXMethodDecl(CXXDestructor, RD, L, N, T, /*DInfo=*/0, false,
> isInline),
> + : CXXMethodDecl(CXXDestructor, RD, L, N, T, /*TInfo=*/0, false,
> isInline),
> ImplicitlyDefined(false), OperatorDelete(0) {
> setImplicit(isImplicitlyDeclared);
> }
> @@ -1258,15 +1258,15 @@
> bool Explicit : 1;
>
> CXXConversionDecl(CXXRecordDecl *RD, SourceLocation L,
> - DeclarationName N, QualType T, DeclaratorInfo
> *DInfo,
> + DeclarationName N, QualType T, TypeSourceInfo
> *TInfo,
> bool isInline, bool isExplicit)
> - : CXXMethodDecl(CXXConversion, RD, L, N, T, DInfo, false,
> isInline),
> + : CXXMethodDecl(CXXConversion, RD, L, N, T, TInfo, false,
> isInline),
> Explicit(isExplicit) { }
>
> public:
> static CXXConversionDecl *Create(ASTContext &C, CXXRecordDecl *RD,
> SourceLocation L, DeclarationName
> N,
> - QualType T, DeclaratorInfo *DInfo,
> + QualType T, TypeSourceInfo *TInfo,
> bool isInline, bool isExplicit);
>
> /// isExplicit - Whether this is an explicit conversion operator
>
> Modified: cfe/trunk/include/clang/AST/DeclObjC.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/include/clang/AST/DeclObjC.h (original)
> +++ cfe/trunk/include/clang/AST/DeclObjC.h Sun Dec 6 20:54:59 2009
> @@ -578,14 +578,14 @@
>
> private:
> ObjCIvarDecl(DeclContext *DC, SourceLocation L, IdentifierInfo *Id,
> - QualType T, DeclaratorInfo *DInfo, AccessControl ac,
> Expr *BW)
> - : FieldDecl(ObjCIvar, DC, L, Id, T, DInfo, BW, /*Mutable=*/
> false),
> + QualType T, TypeSourceInfo *TInfo, AccessControl ac,
> Expr *BW)
> + : FieldDecl(ObjCIvar, DC, L, Id, T, TInfo, BW, /*Mutable=*/
> false),
> DeclAccess(ac) {}
>
> public:
> static ObjCIvarDecl *Create(ASTContext &C, DeclContext *DC,
> SourceLocation L,
> IdentifierInfo *Id, QualType T,
> - DeclaratorInfo *DInfo,
> + TypeSourceInfo *TInfo,
> AccessControl ac, Expr *BW = NULL);
>
> void setAccessControl(AccessControl ac) { DeclAccess = ac; }
> @@ -612,7 +612,7 @@
> ObjCAtDefsFieldDecl(DeclContext *DC, SourceLocation L,
> IdentifierInfo *Id,
> QualType T, Expr *BW)
> : FieldDecl(ObjCAtDefsField, DC, L, Id, T,
> - /*DInfo=*/0, // FIXME: Do ObjCAtDefs have
> declarators ?
> + /*TInfo=*/0, // FIXME: Do ObjCAtDefs have
> declarators ?
> BW, /*Mutable=*/false) {}
>
> public:
>
> Modified: cfe/trunk/include/clang/AST/DeclTemplate.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclTemplate.h?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/include/clang/AST/DeclTemplate.h (original)
> +++ cfe/trunk/include/clang/AST/DeclTemplate.h Sun Dec 6 20:54:59
> 2009
> @@ -573,7 +573,7 @@
> bool ParameterPack : 1;
>
> /// \brief The default template argument, if any.
> - DeclaratorInfo *DefaultArgument;
> + TypeSourceInfo *DefaultArgument;
>
> TemplateTypeParmDecl(DeclContext *DC, SourceLocation L,
> IdentifierInfo *Id,
> bool Typename, QualType Type, bool
> ParameterPack)
> @@ -601,7 +601,7 @@
> QualType getDefaultArgument() const { return DefaultArgument-
> >getType(); }
>
> /// \brief Retrieves the default argument's source information, if
> any.
> - DeclaratorInfo *getDefaultArgumentInfo() const { return
> DefaultArgument; }
> + TypeSourceInfo *getDefaultArgumentInfo() const { return
> DefaultArgument; }
>
> /// \brief Retrieves the location of the default argument
> declaration.
> SourceLocation getDefaultArgumentLoc() const;
> @@ -613,7 +613,7 @@
> /// \brief Set the default argument for this template parameter, and
> /// whether that default argument was inherited from another
> /// declaration.
> - void setDefaultArgument(DeclaratorInfo *DefArg, bool Inherited) {
> + void setDefaultArgument(TypeSourceInfo *DefArg, bool Inherited) {
> DefaultArgument = DefArg;
> InheritedDefault = Inherited;
> }
> @@ -652,15 +652,15 @@
>
> NonTypeTemplateParmDecl(DeclContext *DC, SourceLocation L,
> unsigned D,
> unsigned P, IdentifierInfo *Id, QualType T,
> - DeclaratorInfo *DInfo)
> - : VarDecl(NonTypeTemplateParm, DC, L, Id, T, DInfo,
> VarDecl::None),
> + TypeSourceInfo *TInfo)
> + : VarDecl(NonTypeTemplateParm, DC, L, Id, T, TInfo,
> VarDecl::None),
> TemplateParmPosition(D, P), DefaultArgument(0)
> { }
>
> public:
> static NonTypeTemplateParmDecl *
> Create(ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D,
> - unsigned P, IdentifierInfo *Id, QualType T, DeclaratorInfo
> *DInfo);
> + unsigned P, IdentifierInfo *Id, QualType T, TypeSourceInfo
> *TInfo);
>
> using TemplateParmPosition::getDepth;
> using TemplateParmPosition::getPosition;
>
> Modified: cfe/trunk/include/clang/AST/Expr.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/include/clang/AST/Expr.h (original)
> +++ cfe/trunk/include/clang/AST/Expr.h Sun Dec 6 20:54:59 2009
> @@ -970,7 +970,7 @@
> bool isSizeof : 1; // true if sizeof, false if alignof.
> bool isType : 1; // true if operand is a type, false if an
> expression
> union {
> - DeclaratorInfo *Ty;
> + TypeSourceInfo *Ty;
> Stmt *Ex;
> } Argument;
> SourceLocation OpLoc, RParenLoc;
> @@ -979,15 +979,15 @@
> virtual void DoDestroy(ASTContext& C);
>
> public:
> - SizeOfAlignOfExpr(bool issizeof, DeclaratorInfo *DInfo,
> + SizeOfAlignOfExpr(bool issizeof, TypeSourceInfo *TInfo,
> QualType resultType, SourceLocation op,
> SourceLocation rp) :
> Expr(SizeOfAlignOfExprClass, resultType,
> false, // Never type-dependent (C++ [temp.dep.expr]p3).
> // Value-dependent if the argument is type-dependent.
> - DInfo->getType()->isDependentType()),
> + TInfo->getType()->isDependentType()),
> isSizeof(issizeof), isType(true), OpLoc(op), RParenLoc(rp) {
> - Argument.Ty = DInfo;
> + Argument.Ty = TInfo;
> }
>
> SizeOfAlignOfExpr(bool issizeof, Expr *E,
> @@ -1012,7 +1012,7 @@
> QualType getArgumentType() const {
> return getArgumentTypeInfo()->getType();
> }
> - DeclaratorInfo *getArgumentTypeInfo() const {
> + TypeSourceInfo *getArgumentTypeInfo() const {
> assert(isArgumentType() && "calling getArgumentType() when arg
> is expr");
> return Argument.Ty;
> }
> @@ -1025,8 +1025,8 @@
> }
>
> void setArgument(Expr *E) { Argument.Ex = E; isType = false; }
> - void setArgument(DeclaratorInfo *DInfo) {
> - Argument.Ty = DInfo;
> + void setArgument(TypeSourceInfo *TInfo) {
> + Argument.Ty = TInfo;
> isType = true;
> }
>
>
> Modified: cfe/trunk/include/clang/AST/TemplateBase.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TemplateBase.h?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/include/clang/AST/TemplateBase.h (original)
> +++ cfe/trunk/include/clang/AST/TemplateBase.h Sun Dec 6 20:54:59
> 2009
> @@ -29,7 +29,7 @@
>
> class Decl;
> class Expr;
> -class DeclaratorInfo;
> +class TypeSourceInfo;
>
> /// \brief Represents a template argument within a class template
> /// specialization.
> @@ -267,7 +267,7 @@
> private:
> union {
> Expr *Expression;
> - DeclaratorInfo *Declarator;
> + TypeSourceInfo *Declarator;
> struct {
> unsigned QualifierRange[2];
> unsigned TemplateNameLoc;
> @@ -277,7 +277,7 @@
> #ifndef NDEBUG
> enum Kind {
> K_None,
> - K_DeclaratorInfo,
> + K_TypeSourceInfo,
> K_Expression,
> K_Template
> } Kind;
> @@ -291,10 +291,10 @@
> #endif
> {}
>
> - TemplateArgumentLocInfo(DeclaratorInfo *DInfo)
> - : Declarator(DInfo)
> + TemplateArgumentLocInfo(TypeSourceInfo *TInfo)
> + : Declarator(TInfo)
> #ifndef NDEBUG
> - , Kind(K_DeclaratorInfo)
> + , Kind(K_TypeSourceInfo)
> #endif
> {}
>
> @@ -316,8 +316,8 @@
> Template.TemplateNameLoc = TemplateNameLoc.getRawEncoding();
> }
>
> - DeclaratorInfo *getAsDeclaratorInfo() const {
> - assert(Kind == K_DeclaratorInfo);
> + TypeSourceInfo *getAsTypeSourceInfo() const {
> + assert(Kind == K_TypeSourceInfo);
> return Declarator;
> }
>
> @@ -342,7 +342,7 @@
> void validateForArgument(const TemplateArgument &Arg) {
> switch (Arg.getKind()) {
> case TemplateArgument::Type:
> - assert(Kind == K_DeclaratorInfo);
> + assert(Kind == K_TypeSourceInfo);
> break;
> case TemplateArgument::Expression:
> case TemplateArgument::Declaration:
> @@ -376,8 +376,8 @@
> : Argument(Argument), LocInfo(Opaque) {
> }
>
> - TemplateArgumentLoc(const TemplateArgument &Argument,
> DeclaratorInfo *DInfo)
> - : Argument(Argument), LocInfo(DInfo) {
> + TemplateArgumentLoc(const TemplateArgument &Argument,
> TypeSourceInfo *TInfo)
> + : Argument(Argument), LocInfo(TInfo) {
> assert(Argument.getKind() == TemplateArgument::Type);
> }
>
> @@ -412,9 +412,9 @@
> return LocInfo;
> }
>
> - DeclaratorInfo *getSourceDeclaratorInfo() const {
> + TypeSourceInfo *getTypeSourceInfo() const {
> assert(Argument.getKind() == TemplateArgument::Type);
> - return LocInfo.getAsDeclaratorInfo();
> + return LocInfo.getAsTypeSourceInfo();
> }
>
> Expr *getSourceExpression() const {
>
> Modified: cfe/trunk/include/clang/AST/TypeLoc.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TypeLoc.h?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/include/clang/AST/TypeLoc.h (original)
> +++ cfe/trunk/include/clang/AST/TypeLoc.h Sun Dec 6 20:54:59 2009
> @@ -19,7 +19,7 @@
>
> namespace clang {
> class ParmVarDecl;
> - class DeclaratorInfo;
> + class TypeSourceInfo;
> class UnqualTypeLoc;
>
> // Predeclare all the type nodes.
> @@ -941,7 +941,7 @@
> assert(size == Loc.getFullDataSize());
>
> // We're potentially copying Expr references here. We don't
> - // bother retaining them because DeclaratorInfos live forever, so
> + // bother retaining them because TypeSourceInfos live forever, so
> // as long as the Expr was retained when originally written into
> // the TypeLoc, we're okay.
> memcpy(Data, Loc.Data, size);
> @@ -968,7 +968,7 @@
> break;
>
> case TemplateArgument::Type:
> - Info = TemplateArgumentLocInfo((DeclaratorInfo*) 0);
> + Info = TemplateArgumentLocInfo((TypeSourceInfo*) 0);
> break;
>
> case TemplateArgument::Template:
> @@ -1043,7 +1043,7 @@
>
> TypeOfExprType> {
> };
>
> -// FIXME: location of the 'typeof' and parens; also the
> DeclaratorInfo
> +// FIXME: location of the 'typeof' and parens; also the
> TypeSourceInfo
> // for the inner type, or (maybe) just express that inline to the
> TypeLoc.
> class TypeOfTypeLoc : public
> InheritingConcreteTypeLoc<TypeSpecTypeLoc,
> TypeOfTypeLoc,
>
> Modified: cfe/trunk/include/clang/AST/TypeLocBuilder.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TypeLocBuilder.h?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/include/clang/AST/TypeLocBuilder.h (original)
> +++ cfe/trunk/include/clang/AST/TypeLocBuilder.h Sun Dec 6 20:54:59
> 2009
> @@ -74,14 +74,14 @@
> return cast<TyLocType>(pushImpl(T, LocalSize));
> }
>
> - /// Creates a DeclaratorInfo for the given type.
> - DeclaratorInfo *getDeclaratorInfo(ASTContext& Context, QualType
> T) {
> + /// Creates a TypeSourceInfo for the given type.
> + TypeSourceInfo *getTypeSourceInfo(ASTContext& Context, QualType
> T) {
> #ifndef NDEBUG
> assert(T == LastTy && "type doesn't match last type pushed!");
> #endif
>
> size_t FullDataSize = Capacity - Index;
> - DeclaratorInfo *DI = Context.CreateDeclaratorInfo(T,
> FullDataSize);
> + TypeSourceInfo *DI = Context.CreateTypeSourceInfo(T,
> FullDataSize);
> memcpy(DI->getTypeLoc().getOpaqueData(), &Buffer[Index],
> FullDataSize);
> return DI;
> }
>
> Modified: cfe/trunk/include/clang/Frontend/PCHReader.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/PCHReader.h?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/include/clang/Frontend/PCHReader.h (original)
> +++ cfe/trunk/include/clang/Frontend/PCHReader.h Sun Dec 6 20:54:59
> 2009
> @@ -553,7 +553,7 @@
> const RecordData &Record, unsigned &Idx);
>
> /// \brief Reads a declarator info from the given record.
> - virtual DeclaratorInfo *GetDeclaratorInfo(const RecordData &Record,
> + virtual TypeSourceInfo *GetTypeSourceInfo(const RecordData &Record,
> unsigned &Idx);
>
> /// \brief Resolve a type ID into a type, potentially building a new
>
> Modified: cfe/trunk/include/clang/Frontend/PCHWriter.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/PCHWriter.h?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/include/clang/Frontend/PCHWriter.h (original)
> +++ cfe/trunk/include/clang/Frontend/PCHWriter.h Sun Dec 6 20:54:59
> 2009
> @@ -274,7 +274,7 @@
> void AddTypeRef(QualType T, RecordData &Record);
>
> /// \brief Emits a reference to a declarator info.
> - void AddDeclaratorInfo(DeclaratorInfo *DInfo, RecordData &Record);
> + void AddTypeSourceInfo(TypeSourceInfo *TInfo, RecordData &Record);
>
> /// \brief Emits a template argument location.
> void AddTemplateArgumentLoc(const TemplateArgumentLoc &Arg,
>
> Modified: cfe/trunk/lib/AST/ASTContext.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/AST/ASTContext.cpp (original)
> +++ cfe/trunk/lib/AST/ASTContext.cpp Sun Dec 6 20:54:59 2009
> @@ -1009,31 +1009,31 @@
> ObjCImpls[CatD] = ImplD;
> }
>
> -/// \brief Allocate an uninitialized DeclaratorInfo.
> +/// \brief Allocate an uninitialized TypeSourceInfo.
> ///
> -/// The caller should initialize the memory held by DeclaratorInfo
> using
> +/// The caller should initialize the memory held by TypeSourceInfo
> using
> /// the TypeLoc wrappers.
> ///
> /// \param T the type that will be the basis for type source info.
> This type
> /// should refer to how the declarator was written in source code,
> not to
> /// what type semantic analysis resolved the declarator to.
> -DeclaratorInfo *ASTContext::CreateDeclaratorInfo(QualType T,
> +TypeSourceInfo *ASTContext::CreateTypeSourceInfo(QualType T,
> unsigned DataSize) {
> if (!DataSize)
> DataSize = TypeLoc::getFullDataSizeForType(T);
> else
> assert(DataSize == TypeLoc::getFullDataSizeForType(T) &&
> - "incorrect data size provided to CreateDeclaratorInfo!");
> + "incorrect data size provided to CreateTypeSourceInfo!");
>
> - DeclaratorInfo *DInfo =
> - (DeclaratorInfo*)BumpAlloc.Allocate(sizeof(DeclaratorInfo) +
> DataSize, 8);
> - new (DInfo) DeclaratorInfo(T);
> - return DInfo;
> + TypeSourceInfo *TInfo =
> + (TypeSourceInfo*)BumpAlloc.Allocate(sizeof(TypeSourceInfo) +
> DataSize, 8);
> + new (TInfo) TypeSourceInfo(T);
> + return TInfo;
> }
>
> -DeclaratorInfo *ASTContext::getTrivialDeclaratorInfo(QualType T,
> +TypeSourceInfo *ASTContext::getTrivialTypeSourceInfo(QualType T,
> SourceLocation
> L) {
> - DeclaratorInfo *DI = CreateDeclaratorInfo(T);
> + TypeSourceInfo *DI = CreateTypeSourceInfo(T);
> DI->getTypeLoc().initialize(L);
> return DI;
> }
> @@ -2808,7 +2808,7 @@
> for (unsigned i = 0; i < 4; ++i) {
> FieldDecl *Field = FieldDecl::Create(*this,
> CFConstantStringTypeDecl,
> SourceLocation(), 0,
> - FieldTypes[i], /*DInfo=*/
> 0,
> + FieldTypes[i], /*TInfo=*/
> 0,
> /*BitWidth=*/0,
> /*Mutable=*/false);
> CFConstantStringTypeDecl->addDecl(Field);
> @@ -2844,7 +2844,7 @@
> FieldDecl *Field = FieldDecl::Create(*this,
>
> ObjCFastEnumerationStateTypeDecl,
> SourceLocation(), 0,
> - FieldTypes[i], /*DInfo=*/
> 0,
> + FieldTypes[i], /*TInfo=*/
> 0,
> /*BitWidth=*/0,
> /*Mutable=*/false);
> ObjCFastEnumerationStateTypeDecl->addDecl(Field);
> @@ -2880,7 +2880,7 @@
> T,
> SourceLocation(),
> &Idents.get(FieldNames[i]),
> - FieldTypes[i], /*DInfo=*/0,
> + FieldTypes[i], /*TInfo=*/0,
> /*BitWidth=*/0,
> /*Mutable=*/false);
> T->addDecl(Field);
> @@ -2927,7 +2927,7 @@
> T,
> SourceLocation(),
> &Idents.get(FieldNames[i]),
> - FieldTypes[i], /*DInfo=*/0,
> + FieldTypes[i], /*TInfo=*/0,
> /*BitWidth=*/0,
> /*Mutable=*/false);
> T->addDecl(Field);
> @@ -3005,7 +3005,7 @@
> continue;
> FieldDecl *Field = FieldDecl::Create(*this, T, SourceLocation(),
> &Idents.get(FieldNames[i]),
> - FieldTypes[i], /*DInfo=*/0,
> + FieldTypes[i], /*TInfo=*/0,
> /*BitWidth=*/0, /*Mutable=*/
> false);
> T->addDecl(Field);
> }
> @@ -3048,7 +3048,7 @@
> for (size_t i = 0; i < 5; ++i) {
> FieldDecl *Field = FieldDecl::Create(*this, T, SourceLocation(),
> &Idents.get(FieldNames[i]),
> - FieldTypes[i], /*DInfo=*/0,
> + FieldTypes[i], /*TInfo=*/0,
> /*BitWidth=*/0, /*Mutable=*/
> false);
> T->addDecl(Field);
> }
> @@ -3068,7 +3068,7 @@
> FieldType);
>
> FieldDecl *Field = FieldDecl::Create(*this, T, SourceLocation(),
> - Name, FieldType, /*DInfo=*/
> 0,
> + Name, FieldType, /*TInfo=*/
> 0,
> /*BitWidth=*/0, /*Mutable=*/
> false);
> T->addDecl(Field);
> }
>
> Modified: cfe/trunk/lib/AST/Decl.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/AST/Decl.cpp (original)
> +++ cfe/trunk/lib/AST/Decl.cpp Sun Dec 6 20:54:59 2009
> @@ -38,7 +38,7 @@
> }
>
> /// \brief Return the TypeLoc wrapper for the type source info.
> -TypeLoc DeclaratorInfo::getTypeLoc() const {
> +TypeLoc TypeSourceInfo::getTypeLoc() const {
> return TypeLoc(Ty, (void*)(this + 1));
> }
>
> @@ -86,9 +86,9 @@
>
> ParmVarDecl *ParmVarDecl::Create(ASTContext &C, DeclContext *DC,
> SourceLocation L, IdentifierInfo *Id,
> - QualType T, DeclaratorInfo *DInfo,
> + QualType T, TypeSourceInfo *TInfo,
> StorageClass S, Expr *DefArg) {
> - return new (C) ParmVarDecl(ParmVar, DC, L, Id, T, DInfo, S,
> DefArg);
> + return new (C) ParmVarDecl(ParmVar, DC, L, Id, T, TInfo, S,
> DefArg);
> }
>
> SourceRange ParmVarDecl::getDefaultArgRange() const {
> @@ -136,11 +136,11 @@
> FunctionDecl *FunctionDecl::Create(ASTContext &C, DeclContext *DC,
> SourceLocation L,
> DeclarationName N, QualType T,
> - DeclaratorInfo *DInfo,
> + TypeSourceInfo *TInfo,
> StorageClass S, bool isInline,
> bool hasWrittenPrototype) {
> FunctionDecl *New
> - = new (C) FunctionDecl(Function, DC, L, N, T, DInfo, S,
> isInline);
> + = new (C) FunctionDecl(Function, DC, L, N, T, TInfo, S,
> isInline);
> New->HasWrittenPrototype = hasWrittenPrototype;
> return New;
> }
> @@ -151,8 +151,8 @@
>
> FieldDecl *FieldDecl::Create(ASTContext &C, DeclContext *DC,
> SourceLocation L,
> IdentifierInfo *Id, QualType T,
> - DeclaratorInfo *DInfo, Expr *BW, bool
> Mutable) {
> - return new (C) FieldDecl(Decl::Field, DC, L, Id, T, DInfo, BW,
> Mutable);
> + TypeSourceInfo *TInfo, Expr *BW, bool
> Mutable) {
> + return new (C) FieldDecl(Decl::Field, DC, L, Id, T, TInfo, BW,
> Mutable);
> }
>
> bool FieldDecl::isAnonymousStructOrUnion() const {
> @@ -179,8 +179,8 @@
>
> TypedefDecl *TypedefDecl::Create(ASTContext &C, DeclContext *DC,
> SourceLocation L, IdentifierInfo *Id,
> - DeclaratorInfo *DInfo) {
> - return new (C) TypedefDecl(DC, L, Id, DInfo);
> + TypeSourceInfo *TInfo) {
> + return new (C) TypedefDecl(DC, L, Id, TInfo);
> }
>
> EnumDecl *EnumDecl::Create(ASTContext &C, DeclContext *DC,
> SourceLocation L,
> @@ -535,9 +535,9 @@
> //
> =
> =
> =
> ----------------------------------------------------------------------=
> ==//
>
> VarDecl *VarDecl::Create(ASTContext &C, DeclContext *DC,
> SourceLocation L,
> - IdentifierInfo *Id, QualType T,
> DeclaratorInfo *DInfo,
> + IdentifierInfo *Id, QualType T,
> TypeSourceInfo *TInfo,
> StorageClass S) {
> - return new (C) VarDecl(Var, DC, L, Id, T, DInfo, S);
> + return new (C) VarDecl(Var, DC, L, Id, T, TInfo, S);
> }
>
> void VarDecl::Destroy(ASTContext& C) {
>
> Modified: cfe/trunk/lib/AST/DeclCXX.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclCXX.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/AST/DeclCXX.cpp (original)
> +++ cfe/trunk/lib/AST/DeclCXX.cpp Sun Dec 6 20:54:59 2009
> @@ -540,9 +540,9 @@
> CXXMethodDecl *
> CXXMethodDecl::Create(ASTContext &C, CXXRecordDecl *RD,
> SourceLocation L, DeclarationName N,
> - QualType T, DeclaratorInfo *DInfo,
> + QualType T, TypeSourceInfo *TInfo,
> bool isStatic, bool isInline) {
> - return new (C) CXXMethodDecl(CXXMethod, RD, L, N, T, DInfo,
> + return new (C) CXXMethodDecl(CXXMethod, RD, L, N, T, TInfo,
> isStatic, isInline);
> }
>
> @@ -665,11 +665,11 @@
>
> CXXBaseOrMemberInitializer::
> CXXBaseOrMemberInitializer(ASTContext &Context,
> - DeclaratorInfo *DInfo,
> CXXConstructorDecl *C,
> + TypeSourceInfo *TInfo,
> CXXConstructorDecl *C,
> SourceLocation L,
> Expr **Args, unsigned NumArgs,
> SourceLocation R)
> - : BaseOrMember(DInfo), Args(0), NumArgs(0), CtorOrAnonUnion(C),
> + : BaseOrMember(TInfo), Args(0), NumArgs(0), CtorOrAnonUnion(C),
> LParenLoc(L), RParenLoc(R)
> {
> if (NumArgs > 0) {
> @@ -706,21 +706,21 @@
>
> TypeLoc CXXBaseOrMemberInitializer::getBaseClassLoc() const {
> if (isBaseInitializer())
> - return BaseOrMember.get<DeclaratorInfo*>()->getTypeLoc();
> + return BaseOrMember.get<TypeSourceInfo*>()->getTypeLoc();
> else
> return TypeLoc();
> }
>
> Type *CXXBaseOrMemberInitializer::getBaseClass() {
> if (isBaseInitializer())
> - return BaseOrMember.get<DeclaratorInfo*>()-
> >getType().getTypePtr();
> + return BaseOrMember.get<TypeSourceInfo*>()-
> >getType().getTypePtr();
> else
> return 0;
> }
>
> const Type *CXXBaseOrMemberInitializer::getBaseClass() const {
> if (isBaseInitializer())
> - return BaseOrMember.get<DeclaratorInfo*>()-
> >getType().getTypePtr();
> + return BaseOrMember.get<TypeSourceInfo*>()-
> >getType().getTypePtr();
> else
> return 0;
> }
> @@ -739,12 +739,12 @@
> CXXConstructorDecl *
> CXXConstructorDecl::Create(ASTContext &C, CXXRecordDecl *RD,
> SourceLocation L, DeclarationName N,
> - QualType T, DeclaratorInfo *DInfo,
> + QualType T, TypeSourceInfo *TInfo,
> bool isExplicit,
> bool isInline, bool isImplicitlyDeclared) {
> assert(N.getNameKind() == DeclarationName::CXXConstructorName &&
> "Name must refer to a constructor");
> - return new (C) CXXConstructorDecl(RD, L, N, T, DInfo, isExplicit,
> isInline,
> + return new (C) CXXConstructorDecl(RD, L, N, T, TInfo, isExplicit,
> isInline,
> isImplicitlyDeclared);
> }
>
> @@ -856,11 +856,11 @@
> CXXConversionDecl *
> CXXConversionDecl::Create(ASTContext &C, CXXRecordDecl *RD,
> SourceLocation L, DeclarationName N,
> - QualType T, DeclaratorInfo *DInfo,
> + QualType T, TypeSourceInfo *TInfo,
> bool isInline, bool isExplicit) {
> assert(N.getNameKind() ==
> DeclarationName::CXXConversionFunctionName &&
> "Name must refer to a conversion function");
> - return new (C) CXXConversionDecl(RD, L, N, T, DInfo, isInline,
> isExplicit);
> + return new (C) CXXConversionDecl(RD, L, N, T, TInfo, isInline,
> isExplicit);
> }
>
> FriendDecl *FriendDecl::Create(ASTContext &C, DeclContext *DC,
>
> Modified: cfe/trunk/lib/AST/DeclObjC.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclObjC.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/AST/DeclObjC.cpp (original)
> +++ cfe/trunk/lib/AST/DeclObjC.cpp Sun Dec 6 20:54:59 2009
> @@ -501,9 +501,9 @@
>
> ObjCIvarDecl *ObjCIvarDecl::Create(ASTContext &C, DeclContext *DC,
> SourceLocation L, IdentifierInfo
> *Id,
> - QualType T, DeclaratorInfo *DInfo,
> + QualType T, TypeSourceInfo *TInfo,
> AccessControl ac, Expr *BW) {
> - return new (C) ObjCIvarDecl(DC, L, Id, T, DInfo, ac, BW);
> + return new (C) ObjCIvarDecl(DC, L, Id, T, TInfo, ac, BW);
> }
>
>
>
> Modified: cfe/trunk/lib/AST/DeclTemplate.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclTemplate.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/AST/DeclTemplate.cpp (original)
> +++ cfe/trunk/lib/AST/DeclTemplate.cpp Sun Dec 6 20:54:59 2009
> @@ -262,8 +262,8 @@
> NonTypeTemplateParmDecl::Create(ASTContext &C, DeclContext *DC,
> SourceLocation L, unsigned D,
> unsigned P,
> IdentifierInfo *Id, QualType T,
> - DeclaratorInfo *DInfo) {
> - return new (C) NonTypeTemplateParmDecl(DC, L, D, P, Id, T, DInfo);
> + TypeSourceInfo *TInfo) {
> + return new (C) NonTypeTemplateParmDecl(DC, L, D, P, Id, T, TInfo);
> }
>
> SourceLocation NonTypeTemplateParmDecl::getDefaultArgumentLoc()
> const {
>
> Modified: cfe/trunk/lib/AST/TemplateBase.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/TemplateBase.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/AST/TemplateBase.cpp (original)
> +++ cfe/trunk/lib/AST/TemplateBase.cpp Sun Dec 6 20:54:59 2009
> @@ -102,7 +102,7 @@
> return getSourceDeclExpression()->getSourceRange();
>
> case TemplateArgument::Type:
> - return getSourceDeclaratorInfo()-
> >getTypeLoc().getFullSourceRange();
> + return getTypeSourceInfo()->getTypeLoc().getFullSourceRange();
>
> case TemplateArgument::Template:
> if (getTemplateQualifierRange().isValid())
>
> Modified: cfe/trunk/lib/Frontend/PCHReader.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReader.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Frontend/PCHReader.cpp (original)
> +++ cfe/trunk/lib/Frontend/PCHReader.cpp Sun Dec 6 20:54:59 2009
> @@ -2113,17 +2113,17 @@
> TL.setProtocolLoc(i,
> SourceLocation::getFromRawEncoding(Record[Idx++]));
> }
>
> -DeclaratorInfo *PCHReader::GetDeclaratorInfo(const RecordData
> &Record,
> +TypeSourceInfo *PCHReader::GetTypeSourceInfo(const RecordData
> &Record,
> unsigned &Idx) {
> QualType InfoTy = GetType(Record[Idx++]);
> if (InfoTy.isNull())
> return 0;
>
> - DeclaratorInfo *DInfo = getContext()->CreateDeclaratorInfo(InfoTy);
> + TypeSourceInfo *TInfo = getContext()->CreateTypeSourceInfo(InfoTy);
> TypeLocReader TLR(*this, Record, Idx);
> - for (TypeLoc TL = DInfo->getTypeLoc(); !TL.isNull(); TL =
> TL.getNextTypeLoc())
> + for (TypeLoc TL = TInfo->getTypeLoc(); !TL.isNull(); TL =
> TL.getNextTypeLoc())
> TLR.Visit(TL);
> - return DInfo;
> + return TInfo;
> }
>
> QualType PCHReader::GetType(pch::TypeID ID) {
> @@ -2189,7 +2189,7 @@
> case TemplateArgument::Expression:
> return ReadDeclExpr();
> case TemplateArgument::Type:
> - return GetDeclaratorInfo(Record, Index);
> + return GetTypeSourceInfo(Record, Index);
> case TemplateArgument::Template: {
> SourceLocation
> QualStart = SourceLocation::getFromRawEncoding(Record[Index++]),
>
> Modified: cfe/trunk/lib/Frontend/PCHReaderDecl.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReaderDecl.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Frontend/PCHReaderDecl.cpp (original)
> +++ cfe/trunk/lib/Frontend/PCHReaderDecl.cpp Sun Dec 6 20:54:59 2009
> @@ -107,7 +107,7 @@
> // the type associated with the TypedefDecl.
> VisitNamedDecl(TD);
> uint64_t TypeData = Record[Idx++];
> - TD->setTypeDeclaratorInfo(Reader.GetDeclaratorInfo(Record, Idx));
> + TD->setTypeSourceInfo(Reader.GetTypeSourceInfo(Record, Idx));
> TD->setTypeForDecl(Reader.GetType(TypeData).getTypePtr());
> }
>
> @@ -150,9 +150,9 @@
>
> void PCHDeclReader::VisitDeclaratorDecl(DeclaratorDecl *DD) {
> VisitValueDecl(DD);
> - DeclaratorInfo *DInfo = Reader.GetDeclaratorInfo(Record, Idx);
> - if (DInfo)
> - DD->setDeclaratorInfo(DInfo);
> + TypeSourceInfo *TInfo = Reader.GetTypeSourceInfo(Record, Idx);
> + if (TInfo)
> + DD->setTypeSourceInfo(TInfo);
> }
>
> void PCHDeclReader::VisitFunctionDecl(FunctionDecl *FD) {
>
> Modified: cfe/trunk/lib/Frontend/PCHReaderStmt.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReaderStmt.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Frontend/PCHReaderStmt.cpp (original)
> +++ cfe/trunk/lib/Frontend/PCHReaderStmt.cpp Sun Dec 6 20:54:59 2009
> @@ -428,7 +428,7 @@
> E->setArgument(cast<Expr>(StmtStack.back()));
> ++Idx;
> } else {
> - E->setArgument(Reader.GetDeclaratorInfo(Record, Idx));
> + E->setArgument(Reader.GetTypeSourceInfo(Record, Idx));
> }
> E->setOperatorLoc(SourceLocation::getFromRawEncoding(Record[Idx+
> +]));
> E->setRParenLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
>
> Modified: cfe/trunk/lib/Frontend/PCHWriter.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHWriter.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Frontend/PCHWriter.cpp (original)
> +++ cfe/trunk/lib/Frontend/PCHWriter.cpp Sun Dec 6 20:54:59 2009
> @@ -2140,7 +2140,7 @@
> AddStmt(Arg.getLocInfo().getAsExpr());
> break;
> case TemplateArgument::Type:
> - AddDeclaratorInfo(Arg.getLocInfo().getAsDeclaratorInfo(),
> Record);
> + AddTypeSourceInfo(Arg.getLocInfo().getAsTypeSourceInfo(),
> Record);
> break;
> case TemplateArgument::Template:
> Record.push_back(
> @@ -2156,15 +2156,15 @@
> }
> }
>
> -void PCHWriter::AddDeclaratorInfo(DeclaratorInfo *DInfo, RecordData
> &Record) {
> - if (DInfo == 0) {
> +void PCHWriter::AddTypeSourceInfo(TypeSourceInfo *TInfo, RecordData
> &Record) {
> + if (TInfo == 0) {
> AddTypeRef(QualType(), Record);
> return;
> }
>
> - AddTypeRef(DInfo->getType(), Record);
> + AddTypeRef(TInfo->getType(), Record);
> TypeLocWriter TLW(*this, Record);
> - for (TypeLoc TL = DInfo->getTypeLoc(); !TL.isNull(); TL =
> TL.getNextTypeLoc())
> + for (TypeLoc TL = TInfo->getTypeLoc(); !TL.isNull(); TL =
> TL.getNextTypeLoc())
> TLW.Visit(TL);
> }
>
>
> Modified: cfe/trunk/lib/Frontend/PCHWriterDecl.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHWriterDecl.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Frontend/PCHWriterDecl.cpp (original)
> +++ cfe/trunk/lib/Frontend/PCHWriterDecl.cpp Sun Dec 6 20:54:59 2009
> @@ -106,7 +106,7 @@
>
> void PCHDeclWriter::VisitTypedefDecl(TypedefDecl *D) {
> VisitTypeDecl(D);
> - Writer.AddDeclaratorInfo(D->getTypeDeclaratorInfo(), Record);
> + Writer.AddTypeSourceInfo(D->getTypeSourceInfo(), Record);
> Code = pch::DECL_TYPEDEF;
> }
>
> @@ -151,7 +151,7 @@
>
> void PCHDeclWriter::VisitDeclaratorDecl(DeclaratorDecl *D) {
> VisitValueDecl(D);
> - Writer.AddDeclaratorInfo(D->getDeclaratorInfo(), Record);
> + Writer.AddTypeSourceInfo(D->getTypeSourceInfo(), Record);
> }
>
> void PCHDeclWriter::VisitFunctionDecl(FunctionDecl *D) {
> @@ -370,7 +370,7 @@
> // If the assumptions about the DECL_PARM_VAR abbrev are true, use
> it. Here
> // we dynamically check for the properties that we optimize for,
> but don't
> // know are true of all PARM_VAR_DECLs.
> - if (!D->getDeclaratorInfo() &&
> + if (!D->getTypeSourceInfo() &&
> !D->hasAttrs() &&
> !D->isImplicit() &&
> !D->isUsed() &&
>
> Modified: cfe/trunk/lib/Frontend/PCHWriterStmt.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHWriterStmt.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Frontend/PCHWriterStmt.cpp (original)
> +++ cfe/trunk/lib/Frontend/PCHWriterStmt.cpp Sun Dec 6 20:54:59 2009
> @@ -388,7 +388,7 @@
> VisitExpr(E);
> Record.push_back(E->isSizeOf());
> if (E->isArgumentType())
> - Writer.AddDeclaratorInfo(E->getArgumentTypeInfo(), Record);
> + Writer.AddTypeSourceInfo(E->getArgumentTypeInfo(), Record);
> else {
> Record.push_back(0);
> Writer.WriteSubStmt(E->getArgumentExpr());
>
> Modified: cfe/trunk/lib/Frontend/RewriteObjC.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/RewriteObjC.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Frontend/RewriteObjC.cpp (original)
> +++ cfe/trunk/lib/Frontend/RewriteObjC.cpp Sun Dec 6 20:54:59 2009
> @@ -2678,7 +2678,7 @@
>
> // Build sizeof(returnType)
> SizeOfAlignOfExpr *sizeofExpr = new (Context)
> SizeOfAlignOfExpr(true,
> - Context-
> >getTrivialDeclaratorInfo(returnType),
> + Context-
> >getTrivialTypeSourceInfo(returnType),
> Context->getSizeType(),
> SourceLocation(),
> SourceLocation());
> // (sizeof(returnType) <= 8 ? objc_msgSend(...) :
> objc_msgSend_stret(...))
> @@ -2718,12 +2718,12 @@
> // typedef struct objc_object Protocol;
> QualType RewriteObjC::getProtocolType() {
> if (!ProtocolTypeDecl) {
> - DeclaratorInfo *DInfo
> - = Context->getTrivialDeclaratorInfo(Context->getObjCIdType());
> + TypeSourceInfo *TInfo
> + = Context->getTrivialTypeSourceInfo(Context->getObjCIdType());
> ProtocolTypeDecl = TypedefDecl::Create(*Context, TUDecl,
> SourceLocation(),
> &Context-
> >Idents.get("Protocol"),
> - DInfo);
> + TInfo);
> }
> return Context->getTypeDeclType(ProtocolTypeDecl);
> }
>
> Modified: cfe/trunk/lib/Index/ASTVisitor.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/ASTVisitor.h?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Index/ASTVisitor.h (original)
> +++ cfe/trunk/lib/Index/ASTVisitor.h Sun Dec 6 20:54:59 2009
> @@ -52,8 +52,8 @@
>
> void VisitDeclaratorDecl(DeclaratorDecl *D) {
> BaseDeclVisitor::VisitDeclaratorDecl(D);
> - if (DeclaratorInfo *DInfo = D->getDeclaratorInfo())
> - Visit(DInfo->getTypeLoc());
> + if (TypeSourceInfo *TInfo = D->getTypeSourceInfo())
> + Visit(TInfo->getTypeLoc());
> }
>
> void VisitFunctionDecl(FunctionDecl *D) {
>
> Modified: cfe/trunk/lib/Index/ResolveLocation.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/ResolveLocation.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Index/ResolveLocation.cpp (original)
> +++ cfe/trunk/lib/Index/ResolveLocation.cpp Sun Dec 6 20:54:59 2009
> @@ -30,7 +30,7 @@
> ASTContext &Ctx;
> SourceLocation Loc;
>
> - ASTLocation ResolveInDeclarator(Decl *D, Stmt *Stm,
> DeclaratorInfo *DInfo);
> + ASTLocation ResolveInDeclarator(Decl *D, Stmt *Stm,
> TypeSourceInfo *TInfo);
>
> enum RangePos {
> BeforeLoc,
> @@ -39,13 +39,13 @@
> };
>
> RangePos CheckRange(SourceRange Range);
> - RangePos CheckRange(DeclaratorInfo *DInfo);
> + RangePos CheckRange(TypeSourceInfo *TInfo);
> RangePos CheckRange(Decl *D) {
> if (DeclaratorDecl *DD = dyn_cast<DeclaratorDecl>(D))
> - if (ContainsLocation(DD->getDeclaratorInfo()))
> + if (ContainsLocation(DD->getTypeSourceInfo()))
> return ContainsLoc;
> if (TypedefDecl *TD = dyn_cast<TypedefDecl>(D))
> - if (ContainsLocation(TD->getTypeDeclaratorInfo()))
> + if (ContainsLocation(TD->getTypeSourceInfo()))
> return ContainsLoc;
>
> return CheckRange(D->getSourceRange());
> @@ -142,9 +142,9 @@
> "Should visit only after verifying that loc is in range");
>
> if (Node->isArgumentType()) {
> - DeclaratorInfo *DInfo = Node->getArgumentTypeInfo();
> - if (ContainsLocation(DInfo))
> - return ResolveInDeclarator(Parent, Node, DInfo);
> + TypeSourceInfo *TInfo = Node->getArgumentTypeInfo();
> + if (ContainsLocation(TInfo))
> + return ResolveInDeclarator(Parent, Node, TInfo);
> } else {
> Expr *SubNode = Node->getArgumentExpr();
> if (ContainsLocation(SubNode))
> @@ -245,8 +245,8 @@
> assert(ContainsLocation(D) &&
> "Should visit only after verifying that loc is in range");
>
> - if (ContainsLocation(D->getDeclaratorInfo()))
> - return ResolveInDeclarator(D, 0, D->getDeclaratorInfo());
> + if (ContainsLocation(D->getTypeSourceInfo()))
> + return ResolveInDeclarator(D, 0, D->getTypeSourceInfo());
>
> // First, search through the parameters of the function.
> for (FunctionDecl::param_iterator
> @@ -296,8 +296,8 @@
> ASTLocation DeclLocResolver::VisitDeclaratorDecl(DeclaratorDecl *D) {
> assert(ContainsLocation(D) &&
> "Should visit only after verifying that loc is in range");
> - if (ContainsLocation(D->getDeclaratorInfo()))
> - return ResolveInDeclarator(D, /*Stmt=*/0, D-
> >getDeclaratorInfo());
> + if (ContainsLocation(D->getTypeSourceInfo()))
> + return ResolveInDeclarator(D, /*Stmt=*/0, D-
> >getTypeSourceInfo());
>
> return ASTLocation(D);
> }
> @@ -306,8 +306,8 @@
> assert(ContainsLocation(D) &&
> "Should visit only after verifying that loc is in range");
>
> - if (ContainsLocation(D->getTypeDeclaratorInfo()))
> - return ResolveInDeclarator(D, /*Stmt=*/0, D-
> >getTypeDeclaratorInfo());
> + if (ContainsLocation(D->getTypeSourceInfo()))
> + return ResolveInDeclarator(D, /*Stmt=*/0, D-
> >getTypeSourceInfo());
>
> return ASTLocation(D);
> }
> @@ -321,8 +321,8 @@
> if (Init && ContainsLocation(Init))
> return StmtLocResolver(Ctx, Loc, D).Visit(Init);
>
> - if (ContainsLocation(D->getDeclaratorInfo()))
> - return ResolveInDeclarator(D, 0, D->getDeclaratorInfo());
> + if (ContainsLocation(D->getTypeSourceInfo()))
> + return ResolveInDeclarator(D, 0, D->getTypeSourceInfo());
>
> return ASTLocation(D);
> }
> @@ -491,12 +491,12 @@
> }
>
> ASTLocation LocResolverBase::ResolveInDeclarator(Decl *D, Stmt *Stm,
> - DeclaratorInfo
> *DInfo) {
> - assert(ContainsLocation(DInfo) &&
> + TypeSourceInfo
> *TInfo) {
> + assert(ContainsLocation(TInfo) &&
> "Should visit only after verifying that loc is in range");
>
> (void)TypeLocResolver(Ctx, Loc, D);
> - for (TypeLoc TL = DInfo->getTypeLoc(); TL; TL =
> TL.getNextTypeLoc())
> + for (TypeLoc TL = TInfo->getTypeLoc(); TL; TL =
> TL.getNextTypeLoc())
> if (ContainsLocation(TL))
> return TypeLocResolver(Ctx, Loc, D).Visit(TL);
>
> @@ -504,11 +504,11 @@
> return ASTLocation(D, Stm);
> }
>
> -LocResolverBase::RangePos
> LocResolverBase::CheckRange(DeclaratorInfo *DInfo) {
> - if (!DInfo)
> +LocResolverBase::RangePos
> LocResolverBase::CheckRange(TypeSourceInfo *TInfo) {
> + if (!TInfo)
> return BeforeLoc; // Keep looking.
>
> - for (TypeLoc TL = DInfo->getTypeLoc(); TL; TL =
> TL.getNextTypeLoc())
> + for (TypeLoc TL = TInfo->getTypeLoc(); TL; TL =
> TL.getNextTypeLoc())
> if (ContainsLocation(TL))
> return ContainsLoc;
>
>
> Modified: cfe/trunk/lib/Sema/Sema.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Sema/Sema.cpp (original)
> +++ cfe/trunk/lib/Sema/Sema.cpp Sun Dec 6 20:54:59 2009
> @@ -278,20 +278,20 @@
> PushDeclContext(S, Context.getTranslationUnitDecl());
>
> if (PP.getTargetInfo().getPointerWidth(0) >= 64) {
> - DeclaratorInfo *DInfo;
> + TypeSourceInfo *TInfo;
>
> // Install [u]int128_t for 64-bit targets.
> - DInfo = Context.getTrivialDeclaratorInfo(Context.Int128Ty);
> + TInfo = Context.getTrivialTypeSourceInfo(Context.Int128Ty);
> PushOnScopeChains(TypedefDecl::Create(Context, CurContext,
> SourceLocation(),
>
> &Context.Idents.get("__int128_t"),
> - DInfo), TUScope);
> + TInfo), TUScope);
>
> - DInfo =
> Context.getTrivialDeclaratorInfo(Context.UnsignedInt128Ty);
> + TInfo =
> Context.getTrivialTypeSourceInfo(Context.UnsignedInt128Ty);
> PushOnScopeChains(TypedefDecl::Create(Context, CurContext,
> SourceLocation(),
>
> &Context.Idents.get("__uint128_t"),
> - DInfo), TUScope);
> + TInfo), TUScope);
> }
>
>
> @@ -301,7 +301,7 @@
> if (Context.getObjCSelType().isNull()) {
> // Create the built-in typedef for 'SEL'.
> QualType SelT = Context.getPointerType(Context.ObjCBuiltinSelTy);
> - DeclaratorInfo *SelInfo = Context.getTrivialDeclaratorInfo(SelT);
> + TypeSourceInfo *SelInfo = Context.getTrivialTypeSourceInfo(SelT);
> TypedefDecl *SelTypedef
> = TypedefDecl::Create(Context, CurContext, SourceLocation(),
> &Context.Idents.get("SEL"), SelInfo);
> @@ -322,7 +322,7 @@
> // Create the built-in typedef for 'id'.
> if (Context.getObjCIdType().isNull()) {
> QualType IdT =
> Context.getObjCObjectPointerType(Context.ObjCBuiltinIdTy);
> - DeclaratorInfo *IdInfo = Context.getTrivialDeclaratorInfo(IdT);
> + TypeSourceInfo *IdInfo = Context.getTrivialTypeSourceInfo(IdT);
> TypedefDecl *IdTypedef
> = TypedefDecl::Create(Context, CurContext, SourceLocation(),
> &Context.Idents.get("id"), IdInfo);
> @@ -334,7 +334,7 @@
> if (Context.getObjCClassType().isNull()) {
> QualType ClassType
> = Context.getObjCObjectPointerType(Context.ObjCBuiltinClassTy);
> - DeclaratorInfo *ClassInfo =
> Context.getTrivialDeclaratorInfo(ClassType);
> + TypeSourceInfo *ClassInfo =
> Context.getTrivialTypeSourceInfo(ClassType);
> TypedefDecl *ClassTypedef
> = TypedefDecl::Create(Context, CurContext, SourceLocation(),
> &Context.Idents.get("Class"), ClassInfo);
>
> Modified: cfe/trunk/lib/Sema/Sema.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.h?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Sema/Sema.h (original)
> +++ cfe/trunk/lib/Sema/Sema.h Sun Dec 6 20:54:59 2009
> @@ -131,7 +131,7 @@
> BlockSemaInfo *PrevBlockInfo;
> };
>
> -/// \brief Holds a QualType and a DeclaratorInfo* that came out of
> a declarator
> +/// \brief Holds a QualType and a TypeSourceInfo* that came out of
> a declarator
> /// parsing.
> ///
> /// LocInfoType is a "transient" type, only needed for passing to/
> from Parser
> @@ -144,17 +144,17 @@
> LocInfo = (1 << TypeClassBitSize) - 1
> };
>
> - DeclaratorInfo *DeclInfo;
> + TypeSourceInfo *DeclInfo;
>
> - LocInfoType(QualType ty, DeclaratorInfo *DInfo)
> - : Type((TypeClass)LocInfo, ty, ty->isDependentType()),
> DeclInfo(DInfo) {
> + LocInfoType(QualType ty, TypeSourceInfo *TInfo)
> + : Type((TypeClass)LocInfo, ty, ty->isDependentType()),
> DeclInfo(TInfo) {
> assert(getTypeClass() == (TypeClass)LocInfo && "LocInfo didn't
> fit in TC?");
> }
> friend class Sema;
>
> public:
> QualType getType() const { return getCanonicalTypeInternal(); }
> - DeclaratorInfo *getDeclaratorInfo() const { return DeclInfo; }
> + TypeSourceInfo *getTypeSourceInfo() const { return DeclInfo; }
>
> virtual void getAsStringInternal(std::string &Str,
> const PrintingPolicy &Policy)
> const;
> @@ -517,14 +517,14 @@
> QualType BuildBlockPointerType(QualType T, unsigned Quals,
> SourceLocation Loc, DeclarationName
> Entity);
> QualType GetTypeForDeclarator(Declarator &D, Scope *S,
> - DeclaratorInfo **DInfo = 0,
> + TypeSourceInfo **TInfo = 0,
> TagDecl **OwnedDecl = 0);
> - DeclaratorInfo *GetDeclaratorInfoForDeclarator(Declarator &D,
> QualType T);
> - /// \brief Create a LocInfoType to hold the given QualType and
> DeclaratorInfo.
> - QualType CreateLocInfoType(QualType T, DeclaratorInfo *DInfo);
> + TypeSourceInfo *GetTypeSourceInfoForDeclarator(Declarator &D,
> QualType T);
> + /// \brief Create a LocInfoType to hold the given QualType and
> TypeSourceInfo.
> + QualType CreateLocInfoType(QualType T, TypeSourceInfo *TInfo);
> DeclarationName GetNameForDeclarator(Declarator &D);
> DeclarationName GetNameFromUnqualifiedId(const UnqualifiedId &Name);
> - static QualType GetTypeFromParser(TypeTy *Ty, DeclaratorInfo
> **DInfo = 0);
> + static QualType GetTypeFromParser(TypeTy *Ty, TypeSourceInfo
> **TInfo = 0);
> bool CheckSpecifiedExceptionType(QualType T, const SourceRange
> &Range);
> bool CheckDistantExceptionSpec(QualType T);
> bool CheckEquivalentExceptionSpec(
> @@ -596,17 +596,17 @@
> SourceLocation NameLoc,
> unsigned Diagnostic);
> NamedDecl* ActOnTypedefDeclarator(Scope* S, Declarator& D,
> DeclContext* DC,
> - QualType R, DeclaratorInfo
> *DInfo,
> + QualType R, TypeSourceInfo
> *TInfo,
> LookupResult &Previous, bool
> &Redeclaration);
> NamedDecl* ActOnVariableDeclarator(Scope* S, Declarator& D,
> DeclContext* DC,
> - QualType R, DeclaratorInfo
> *DInfo,
> + QualType R, TypeSourceInfo
> *TInfo,
> LookupResult &Previous,
> MultiTemplateParamsArg
> TemplateParamLists,
> bool &Redeclaration);
> void CheckVariableDeclaration(VarDecl *NewVD, LookupResult
> &Previous,
> bool &Redeclaration);
> NamedDecl* ActOnFunctionDeclarator(Scope* S, Declarator& D,
> DeclContext* DC,
> - QualType R, DeclaratorInfo
> *DInfo,
> + QualType R, TypeSourceInfo
> *TInfo,
> LookupResult &Previous,
> MultiTemplateParamsArg
> TemplateParamLists,
> bool IsFunctionDefinition,
> @@ -710,7 +710,7 @@
> AccessSpecifier AS);
>
> FieldDecl *CheckFieldDecl(DeclarationName Name, QualType T,
> - DeclaratorInfo *DInfo,
> + TypeSourceInfo *TInfo,
> RecordDecl *Record, SourceLocation Loc,
> bool Mutable, Expr *BitfieldWidth,
> SourceLocation TSSL,
> @@ -823,7 +823,7 @@
>
> /// Subroutines of ActOnDeclarator().
> TypedefDecl *ParseTypedefDecl(Scope *S, Declarator &D, QualType T,
> - DeclaratorInfo *DInfo);
> + TypeSourceInfo *TInfo);
> void MergeTypeDefDecl(TypedefDecl *New, LookupResult &OldDecls);
> bool MergeFunctionDecl(FunctionDecl *New, Decl *Old);
> bool MergeCompatibleFunctionDecls(FunctionDecl *New, FunctionDecl
> *Old);
> @@ -1385,7 +1385,7 @@
> StmtArg
> SynchBody);
>
> VarDecl *BuildExceptionDeclaration(Scope *S, QualType ExDeclType,
> - DeclaratorInfo *DInfo,
> + TypeSourceInfo *TInfo,
> IdentifierInfo *Name,
> SourceLocation Loc,
> SourceRange Range);
> @@ -1505,7 +1505,7 @@
> virtual OwningExprResult ActOnUnaryOp(Scope *S, SourceLocation
> OpLoc,
> tok::TokenKind Op, ExprArg
> Input);
>
> - OwningExprResult CreateSizeOfAlignOfExpr(DeclaratorInfo *T,
> + OwningExprResult CreateSizeOfAlignOfExpr(TypeSourceInfo *T,
> SourceLocation OpLoc,
> bool isSizeOf,
> SourceRange R);
> OwningExprResult CreateSizeOfAlignOfExpr(Expr *E, SourceLocation
> OpLoc,
> @@ -2131,7 +2131,7 @@
> SourceLocation RParenLoc);
>
> MemInitResult BuildBaseInitializer(QualType BaseType,
> - DeclaratorInfo *BaseDInfo,
> + TypeSourceInfo *BaseTInfo,
> Expr **Args, unsigned NumArgs,
> SourceLocation LParenLoc,
> SourceLocation RParenLoc,
> @@ -2496,7 +2496,7 @@
> TemplateArgumentListBuilder
> &Converted);
>
> bool CheckTemplateArgument(TemplateTypeParmDecl *Param,
> - DeclaratorInfo *Arg);
> + TypeSourceInfo *Arg);
> bool CheckTemplateArgumentAddressOfObjectOrFunction(Expr *Arg,
> NamedDecl
> *&Entity);
> bool CheckTemplateArgumentPointerToMember(Expr *Arg,
> @@ -3128,7 +3128,7 @@
>
> void PerformPendingImplicitInstantiations();
>
> - DeclaratorInfo *SubstType(DeclaratorInfo *T,
> + TypeSourceInfo *SubstType(TypeSourceInfo *T,
> const MultiLevelTemplateArgumentList
> &TemplateArgs,
> SourceLocation Loc, DeclarationName
> Entity);
>
>
> Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaDecl.cpp Sun Dec 6 20:54:59 2009
> @@ -588,7 +588,7 @@
>
> FunctionDecl *New = FunctionDecl::Create(Context,
>
> Context.getTranslationUnitDecl(),
> - Loc, II, R, /*DInfo=*/0,
> + Loc, II, R, /*TInfo=*/0,
> FunctionDecl::Extern,
> false,
> /*hasPrototype=*/true);
> New->setImplicit();
> @@ -599,7 +599,7 @@
> llvm::SmallVector<ParmVarDecl*, 16> Params;
> for (unsigned i = 0, e = FT->getNumArgs(); i != e; ++i)
> Params.push_back(ParmVarDecl::Create(Context, New,
> SourceLocation(), 0,
> - FT->getArgType(i), /
> *DInfo=*/0,
> + FT->getArgType(i), /
> *TInfo=*/0,
> VarDecl::None, 0));
> New->setParams(Context, Params.data(), Params.size());
> }
> @@ -924,7 +924,7 @@
> ParamType != ParamEnd; ++ParamType) {
> ParmVarDecl *Param = ParmVarDecl::Create(Context, New,
> SourceLocation(), 0,
> - *ParamType, /
> *DInfo=*/0,
> + *ParamType, /
> *TInfo=*/0,
> VarDecl::None, 0);
> Param->setImplicit();
> Params.push_back(Param);
> @@ -1678,9 +1678,9 @@
>
> // Mock up a declarator.
> Declarator Dc(DS, Declarator::TypeNameContext);
> - DeclaratorInfo *DInfo = 0;
> - GetTypeForDeclarator(Dc, S, &DInfo);
> - assert(DInfo && "couldn't build declarator info for anonymous
> struct/union");
> + TypeSourceInfo *TInfo = 0;
> + GetTypeForDeclarator(Dc, S, &TInfo);
> + assert(TInfo && "couldn't build declarator info for anonymous
> struct/union");
>
> // Create a declaration for this anonymous struct/union.
> NamedDecl *Anon = 0;
> @@ -1688,7 +1688,7 @@
> Anon = FieldDecl::Create(Context, OwningClass, Record-
> >getLocation(),
> /*IdentifierInfo=*/0,
> Context.getTypeDeclType(Record),
> - DInfo,
> + TInfo,
> /*BitWidth=*/0, /*Mutable=*/false);
> Anon->setAccess(AS_public);
> if (getLangOptions().CPlusPlus)
> @@ -1715,7 +1715,7 @@
> Anon = VarDecl::Create(Context, Owner, Record->getLocation(),
> /*IdentifierInfo=*/0,
> Context.getTypeDeclType(Record),
> - DInfo,
> + TInfo,
> SC);
> }
> Anon->setImplicit();
> @@ -1876,8 +1876,8 @@
> DeclContext *DC;
> NamedDecl *New;
>
> - DeclaratorInfo *DInfo = 0;
> - QualType R = GetTypeForDeclarator(D, S, &DInfo);
> + TypeSourceInfo *TInfo = 0;
> + QualType R = GetTypeForDeclarator(D, S, &TInfo);
>
> LookupResult Previous(*this, Name, D.getIdentifierLoc(),
> LookupOrdinaryName,
> ForRedeclaration);
> @@ -2007,13 +2007,13 @@
> return DeclPtrTy();
> }
>
> - New = ActOnTypedefDeclarator(S, D, DC, R, DInfo, Previous,
> Redeclaration);
> + New = ActOnTypedefDeclarator(S, D, DC, R, TInfo, Previous,
> Redeclaration);
> } else if (R->isFunctionType()) {
> - New = ActOnFunctionDeclarator(S, D, DC, R, DInfo, Previous,
> + New = ActOnFunctionDeclarator(S, D, DC, R, TInfo, Previous,
> move(TemplateParamLists),
> IsFunctionDefinition,
> Redeclaration);
> } else {
> - New = ActOnVariableDeclarator(S, D, DC, R, DInfo, Previous,
> + New = ActOnVariableDeclarator(S, D, DC, R, TInfo, Previous,
> move(TemplateParamLists),
> Redeclaration);
> }
> @@ -2129,7 +2129,7 @@
>
> NamedDecl*
> Sema::ActOnTypedefDeclarator(Scope* S, Declarator& D, DeclContext* DC,
> - QualType R, DeclaratorInfo *DInfo,
> + QualType R, TypeSourceInfo *TInfo,
> LookupResult &Previous, bool
> &Redeclaration) {
> // Typedef declarators cannot be qualified (C++ [dcl.meaning]p1).
> if (D.getCXXScopeSpec().isSet()) {
> @@ -2150,7 +2150,7 @@
> if (D.getDeclSpec().isThreadSpecified())
> Diag(D.getDeclSpec().getThreadSpecLoc(),
> diag::err_invalid_thread);
>
> - TypedefDecl *NewTD = ParseTypedefDecl(S, D, R, DInfo);
> + TypedefDecl *NewTD = ParseTypedefDecl(S, D, R, TInfo);
> if (!NewTD) return 0;
>
> // Handle attributes prior to checking for duplicates in
> MergeVarDecl
> @@ -2176,7 +2176,7 @@
> TryToFixInvalidVariablyModifiedType(T, Context,
> SizeIsNegative);
> if (!FixedTy.isNull()) {
> Diag(D.getIdentifierLoc(),
> diag::warn_illegal_constant_array_size);
> - NewTD-
> >setTypeDeclaratorInfo(Context.getTrivialDeclaratorInfo(FixedTy));
> + NewTD-
> >setTypeSourceInfo(Context.getTrivialTypeSourceInfo(FixedTy));
> } else {
> if (SizeIsNegative)
> Diag(D.getIdentifierLoc(),
> diag::err_typecheck_negative_array_size);
> @@ -2269,7 +2269,7 @@
>
> NamedDecl*
> Sema::ActOnVariableDeclarator(Scope* S, Declarator& D, DeclContext*
> DC,
> - QualType R, DeclaratorInfo *DInfo,
> + QualType R, TypeSourceInfo *TInfo,
> LookupResult &Previous,
> MultiTemplateParamsArg
> TemplateParamLists,
> bool &Redeclaration) {
> @@ -2371,7 +2371,7 @@
> }
>
> NewVD = VarDecl::Create(Context, DC, D.getIdentifierLoc(),
> - II, R, DInfo, SC);
> + II, R, TInfo, SC);
>
> if (D.isInvalidType())
> NewVD->setInvalidDecl();
> @@ -2623,7 +2623,7 @@
>
> NamedDecl*
> Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext*
> DC,
> - QualType R, DeclaratorInfo *DInfo,
> + QualType R, TypeSourceInfo *TInfo,
> LookupResult &Previous,
> MultiTemplateParamsArg
> TemplateParamLists,
> bool IsFunctionDefinition, bool
> &Redeclaration) {
> @@ -2705,7 +2705,7 @@
> // Create the new declaration
> NewFD = CXXConstructorDecl::Create(Context,
> cast<CXXRecordDecl>(DC),
> - D.getIdentifierLoc(), Name,
> R, DInfo,
> + D.getIdentifierLoc(), Name,
> R, TInfo,
> isExplicit, isInline,
> /*isImplicitlyDeclared=*/
> false);
> } else if (Name.getNameKind() ==
> DeclarationName::CXXDestructorName) {
> @@ -2726,7 +2726,7 @@
> // Create a FunctionDecl to satisfy the function definition
> parsing
> // code path.
> NewFD = FunctionDecl::Create(Context, DC, D.getIdentifierLoc(),
> - Name, R, DInfo, SC, isInline,
> + Name, R, TInfo, SC, isInline,
> /*hasPrototype=*/true);
> D.setInvalidType();
> }
> @@ -2739,7 +2739,7 @@
>
> CheckConversionDeclarator(D, R, SC);
> NewFD = CXXConversionDecl::Create(Context,
> cast<CXXRecordDecl>(DC),
> - D.getIdentifierLoc(), Name,
> R, DInfo,
> + D.getIdentifierLoc(), Name,
> R, TInfo,
> isInline, isExplicit);
>
> isVirtualOkay = true;
> @@ -2773,7 +2773,7 @@
>
> // This is a C++ method declaration.
> NewFD = CXXMethodDecl::Create(Context, cast<CXXRecordDecl>(DC),
> - D.getIdentifierLoc(), Name, R,
> DInfo,
> + D.getIdentifierLoc(), Name, R,
> TInfo,
> isStatic, isInline);
>
> isVirtualOkay = !isStatic;
> @@ -2791,7 +2791,7 @@
>
> NewFD = FunctionDecl::Create(Context, DC,
> D.getIdentifierLoc(),
> - Name, R, DInfo, SC, isInline,
> HasPrototype);
> + Name, R, TInfo, SC, isInline,
> HasPrototype);
> }
>
> if (D.isInvalidType())
> @@ -2946,7 +2946,7 @@
> AE = FT->arg_type_end(); AI != AE; ++AI) {
> ParmVarDecl *Param = ParmVarDecl::Create(Context, DC,
> SourceLocation(), 0,
> - *AI, /*DInfo=*/0,
> + *AI, /*TInfo=*/0,
> VarDecl::None, 0);
> Param->setImplicit();
> Params.push_back(Param);
> @@ -3841,9 +3841,9 @@
> if (getLangOptions().CPlusPlus)
> CheckExtraCXXDefaultArguments(D);
>
> - DeclaratorInfo *DInfo = 0;
> + TypeSourceInfo *TInfo = 0;
> TagDecl *OwnedDecl = 0;
> - QualType parmDeclType = GetTypeForDeclarator(D, S, &DInfo,
> &OwnedDecl);
> + QualType parmDeclType = GetTypeForDeclarator(D, S, &TInfo,
> &OwnedDecl);
>
> if (getLangOptions().CPlusPlus && OwnedDecl && OwnedDecl-
> >isDefinition()) {
> // C++ [dcl.fct]p6:
> @@ -3886,7 +3886,7 @@
>
> ParmVarDecl *New
> = ParmVarDecl::Create(Context, CurContext, D.getIdentifierLoc(),
> II,
> - T, DInfo, StorageClass, 0);
> + T, TInfo, StorageClass, 0);
>
> if (D.isInvalidType())
> New->setInvalidDecl();
> @@ -4329,20 +4329,20 @@
> }
>
> TypedefDecl *Sema::ParseTypedefDecl(Scope *S, Declarator &D,
> QualType T,
> - DeclaratorInfo *DInfo) {
> + TypeSourceInfo *TInfo) {
> assert(D.getIdentifier() && "Wrong callback for declspec without
> declarator");
> assert(!T.isNull() && "GetTypeForDeclarator() returned null type");
>
> - if (!DInfo) {
> + if (!TInfo) {
> assert(D.isInvalidType() && "no declarator info for valid type");
> - DInfo = Context.getTrivialDeclaratorInfo(T);
> + TInfo = Context.getTrivialTypeSourceInfo(T);
> }
>
> // Scope manipulation handled by caller.
> TypedefDecl *NewTD = TypedefDecl::Create(Context, CurContext,
> D.getIdentifierLoc(),
> D.getIdentifier(),
> - DInfo);
> + TInfo);
>
> if (const TagType *TT = T->getAs<TagType>()) {
> TagDecl *TD = TT->getDecl();
> @@ -4976,8 +4976,8 @@
> SourceLocation Loc = DeclStart;
> if (II) Loc = D.getIdentifierLoc();
>
> - DeclaratorInfo *DInfo = 0;
> - QualType T = GetTypeForDeclarator(D, S, &DInfo);
> + TypeSourceInfo *TInfo = 0;
> + QualType T = GetTypeForDeclarator(D, S, &TInfo);
> if (getLangOptions().CPlusPlus)
> CheckExtraCXXDefaultArguments(D);
>
> @@ -5003,7 +5003,7 @@
> = (D.getDeclSpec().getStorageClassSpec() ==
> DeclSpec::SCS_mutable);
> SourceLocation TSSL = D.getSourceRange().getBegin();
> FieldDecl *NewFD
> - = CheckFieldDecl(II, T, DInfo, Record, Loc, Mutable, BitWidth,
> TSSL,
> + = CheckFieldDecl(II, T, TInfo, Record, Loc, Mutable, BitWidth,
> TSSL,
> AS, PrevDecl, &D);
> if (NewFD->isInvalidDecl() && PrevDecl) {
> // Don't introduce NewFD into scope; there's already something
> @@ -5027,7 +5027,7 @@
> ///
> /// \todo The Declarator argument is a hack. It will be removed once
> FieldDecl *Sema::CheckFieldDecl(DeclarationName Name, QualType T,
> - DeclaratorInfo *DInfo,
> + TypeSourceInfo *TInfo,
> RecordDecl *Record, SourceLocation
> Loc,
> bool Mutable, Expr *BitWidth,
> SourceLocation TSSL,
> @@ -5083,7 +5083,7 @@
> ZeroWidth = false;
> }
>
> - FieldDecl *NewFD = FieldDecl::Create(Context, Record, Loc, II, T,
> DInfo,
> + FieldDecl *NewFD = FieldDecl::Create(Context, Record, Loc, II, T,
> TInfo,
> BitWidth, Mutable);
> if (InvalidDecl)
> NewFD->setInvalidDecl();
> @@ -5330,8 +5330,8 @@
> // FIXME: Unnamed fields can be handled in various different ways,
> for
> // example, unnamed unions inject all members into the struct
> namespace!
>
> - DeclaratorInfo *DInfo = 0;
> - QualType T = GetTypeForDeclarator(D, S, &DInfo);
> + TypeSourceInfo *TInfo = 0;
> + QualType T = GetTypeForDeclarator(D, S, &TInfo);
>
> if (BitWidth) {
> // 6.7.2.1p3, 6.7.2.1p4
> @@ -5374,7 +5374,7 @@
> // Construct the decl.
> ObjCIvarDecl *NewID = ObjCIvarDecl::Create(Context,
> EnclosingContext, Loc,
> II, T,
> - DInfo, ac, (Expr
> *)BitfieldWidth);
> + TInfo, ac, (Expr
> *)BitfieldWidth);
>
> if (II) {
> NamedDecl *PrevDecl = LookupSingleName(S, II, LookupMemberName,
>
> Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Sun Dec 6 20:54:59 2009
> @@ -195,7 +195,7 @@
> QualType T = S.BuildExtVectorType(curType, S.Owned(sizeExpr),
> Attr.getLoc());
> if (!T.isNull()) {
> // FIXME: preserve the old source info.
> - tDecl-
> >setTypeDeclaratorInfo(S.Context.getTrivialDeclaratorInfo(T));
> + tDecl->setTypeSourceInfo(S.Context.getTrivialTypeSourceInfo(T));
>
> // Remember this typedef decl, we will need it later for
> diagnostics.
> S.ExtVectorDecls.push_back(tDecl);
> @@ -1624,7 +1624,7 @@
> // Install the new type.
> if (TypedefDecl *TD = dyn_cast<TypedefDecl>(D)) {
> // FIXME: preserve existing source info.
> - TD-
> >setTypeDeclaratorInfo(S.Context.getTrivialDeclaratorInfo(NewTy));
> + TD->setTypeSourceInfo(S.Context.getTrivialTypeSourceInfo(NewTy));
> } else
> cast<ValueDecl>(D)->setType(NewTy);
> }
> @@ -1977,11 +1977,11 @@
> if (FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
> NewD = FunctionDecl::Create(FD->getASTContext(), FD-
> >getDeclContext(),
> FD->getLocation(),
> DeclarationName(II),
> - FD->getType(), FD-
> >getDeclaratorInfo());
> + FD->getType(), FD-
> >getTypeSourceInfo());
> } else if (VarDecl *VD = dyn_cast<VarDecl>(ND)) {
> NewD = VarDecl::Create(VD->getASTContext(), VD->getDeclContext(),
> VD->getLocation(), II,
> - VD->getType(), VD->getDeclaratorInfo(),
> + VD->getType(), VD->getTypeSourceInfo(),
> VD->getStorageClass());
> }
> return NewD;
>
> Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Sun Dec 6 20:54:59 2009
> @@ -1000,9 +1000,9 @@
> // It didn't name a member, so see if it names a class.
> QualType BaseType;
>
> - DeclaratorInfo *DInfo = 0;
> + TypeSourceInfo *TInfo = 0;
> if (TemplateTypeTy)
> - BaseType = GetTypeFromParser(TemplateTypeTy, &DInfo);
> + BaseType = GetTypeFromParser(TemplateTypeTy, &TInfo);
> else
> BaseType = QualType::getFromOpaquePtr(getTypeName(*MemberOrBase,
> IdLoc,
> S, &SS));
> @@ -1010,10 +1010,10 @@
> return Diag(IdLoc, diag::err_mem_init_not_member_or_class)
> << MemberOrBase << SourceRange(IdLoc, RParenLoc);
>
> - if (!DInfo)
> - DInfo = Context.getTrivialDeclaratorInfo(BaseType, IdLoc);
> + if (!TInfo)
> + TInfo = Context.getTrivialTypeSourceInfo(BaseType, IdLoc);
>
> - return BuildBaseInitializer(BaseType, DInfo, (Expr **)Args,
> NumArgs,
> + return BuildBaseInitializer(BaseType, TInfo, (Expr **)Args,
> NumArgs,
> LParenLoc, RParenLoc, ClassDecl);
> }
>
> @@ -1151,7 +1151,7 @@
> }
>
> Sema::MemInitResult
> -Sema::BuildBaseInitializer(QualType BaseType, DeclaratorInfo
> *BaseDInfo,
> +Sema::BuildBaseInitializer(QualType BaseType, TypeSourceInfo
> *BaseTInfo,
> Expr **Args, unsigned NumArgs,
> SourceLocation LParenLoc, SourceLocation
> RParenLoc,
> CXXRecordDecl *ClassDecl) {
> @@ -1159,11 +1159,11 @@
> for (unsigned i = 0; i < NumArgs; i++)
> HasDependentArg |= Args[i]->isTypeDependent();
>
> - SourceLocation BaseLoc = BaseDInfo-
> >getTypeLoc().getSourceRange().getBegin();
> + SourceLocation BaseLoc = BaseTInfo-
> >getTypeLoc().getSourceRange().getBegin();
> if (!BaseType->isDependentType()) {
> if (!BaseType->isRecordType())
> return Diag(BaseLoc, diag::err_base_init_does_not_name_class)
> - << BaseType << BaseDInfo->getTypeLoc().getSourceRange();
> + << BaseType << BaseTInfo->getTypeLoc().getSourceRange();
>
> // C++ [class.base.init]p2:
> // [...] Unless the mem-initializer-id names a nonstatic data
> @@ -1210,7 +1210,7 @@
> // class, the mem-initializer is ill-formed.
> if (DirectBaseSpec && VirtualBaseSpec)
> return Diag(BaseLoc, diag::err_base_init_direct_and_virtual)
> - << BaseType << BaseDInfo->getTypeLoc().getSourceRange();
> + << BaseType << BaseTInfo->getTypeLoc().getSourceRange();
> // C++ [base.class.init]p2:
> // Unless the mem-initializer-id names a nonstatic data membeer
> of the
> // constructor's class ot a direst or virtual base of that
> class, the
> @@ -1218,7 +1218,7 @@
> if (!DirectBaseSpec && !VirtualBaseSpec)
> return Diag(BaseLoc, diag::err_not_direct_base_or_virtual)
> << BaseType << ClassDecl->getNameAsCString()
> - << BaseDInfo->getTypeLoc().getSourceRange();
> + << BaseTInfo->getTypeLoc().getSourceRange();
> }
>
> CXXConstructorDecl *C = 0;
> @@ -1245,7 +1245,7 @@
> // subexpression so we can wrap it in a CXXExprWithTemporaries if
> necessary.
> ExprTemporaries.clear();
>
> - return new (Context) CXXBaseOrMemberInitializer(Context,
> BaseDInfo, C,
> + return new (Context) CXXBaseOrMemberInitializer(Context,
> BaseTInfo, C,
> LParenLoc, (Expr
> **)Args,
> NumArgs, RParenLoc);
> }
> @@ -1336,7 +1336,7 @@
> ExprTemporaries.clear();
> CXXBaseOrMemberInitializer *Member =
> new (Context) CXXBaseOrMemberInitializer(Context,
> - Context.getTrivialDeclaratorInfo(VBase-
> >getType(),
> + Context.getTrivialTypeSourceInfo(VBase-
> >getType(),
>
> SourceLocation()),
> Ctor,
> SourceLocation(),
> @@ -1389,7 +1389,7 @@
> ExprTemporaries.clear();
> CXXBaseOrMemberInitializer *Member =
> new (Context) CXXBaseOrMemberInitializer(Context,
> - Context.getTrivialDeclaratorInfo(Base-
> >getType(),
> + Context.getTrivialTypeSourceInfo(Base-
> >getType(),
>
> SourceLocation()),
> Ctor,
> SourceLocation(),
> @@ -2032,7 +2032,7 @@
> ClassDecl->getLocation(), Name,
>
> Context.getFunctionType(Context.VoidTy,
> 0, 0,
> false, 0),
> - /*DInfo=*/0,
> + /*TInfo=*/0,
> /*isExplicit=*/false,
> /*isInline=*/true,
> /*isImplicitlyDeclared=*/true);
> @@ -2104,7 +2104,7 @@
>
> Context.getFunctionType(Context.VoidTy,
> &ArgType,
> 1,
> false, 0),
> - /*DInfo=*/0,
> + /*TInfo=*/0,
> /*isExplicit=*/false,
> /*isInline=*/true,
> /*isImplicitlyDeclared=*/true);
> @@ -2116,7 +2116,7 @@
> ParmVarDecl *FromParam = ParmVarDecl::Create(Context,
> CopyConstructor,
> ClassDecl-
> >getLocation(),
> /*IdentifierInfo=*/0,
> - ArgType, /*DInfo=*/
> 0,
> + ArgType, /*TInfo=*/
> 0,
> VarDecl::None, 0);
> CopyConstructor->setParams(Context, &FromParam, 1);
> ClassDecl->addDecl(CopyConstructor);
> @@ -2190,7 +2190,7 @@
> CXXMethodDecl::Create(Context, ClassDecl, ClassDecl-
> >getLocation(), Name,
> Context.getFunctionType(RetType,
> &ArgType, 1,
> false, 0),
> - /*DInfo=*/0, /*isStatic=*/false, /
> *isInline=*/true);
> + /*TInfo=*/0, /*isStatic=*/false, /
> *isInline=*/true);
> CopyAssignment->setAccess(AS_public);
> CopyAssignment->setImplicit();
> CopyAssignment->setTrivial(ClassDecl->hasTrivialCopyAssignment());
> @@ -2200,7 +2200,7 @@
> ParmVarDecl *FromParam = ParmVarDecl::Create(Context,
> CopyAssignment,
> ClassDecl-
> >getLocation(),
> /*IdentifierInfo=*/0,
> - ArgType, /*DInfo=*/
> 0,
> + ArgType, /*TInfo=*/
> 0,
> VarDecl::None, 0);
> CopyAssignment->setParams(Context, &FromParam, 1);
>
> @@ -4436,7 +4436,7 @@
> /// occurs within a C++ catch clause, returning the newly-created
> /// variable.
> VarDecl *Sema::BuildExceptionDeclaration(Scope *S, QualType
> ExDeclType,
> - DeclaratorInfo *DInfo,
> + TypeSourceInfo *TInfo,
> IdentifierInfo *Name,
> SourceLocation Loc,
> SourceRange Range) {
> @@ -4486,7 +4486,7 @@
> // FIXME: Need to check for abstract classes.
>
> VarDecl *ExDecl = VarDecl::Create(Context, CurContext, Loc,
> - Name, ExDeclType, DInfo,
> VarDecl::None);
> + Name, ExDeclType, TInfo,
> VarDecl::None);
>
> if (Invalid)
> ExDecl->setInvalidDecl();
> @@ -4497,8 +4497,8 @@
> /// ActOnExceptionDeclarator - Parsed the exception-declarator in a C
> ++ catch
> /// handler.
> Sema::DeclPtrTy Sema::ActOnExceptionDeclarator(Scope *S, Declarator
> &D) {
> - DeclaratorInfo *DInfo = 0;
> - QualType ExDeclType = GetTypeForDeclarator(D, S, &DInfo);
> + TypeSourceInfo *TInfo = 0;
> + QualType ExDeclType = GetTypeForDeclarator(D, S, &TInfo);
>
> bool Invalid = D.isInvalidType();
> IdentifierInfo *II = D.getIdentifier();
> @@ -4518,7 +4518,7 @@
> Invalid = true;
> }
>
> - VarDecl *ExDecl = BuildExceptionDeclaration(S, ExDeclType, DInfo,
> + VarDecl *ExDecl = BuildExceptionDeclaration(S, ExDeclType, TInfo,
> D.getIdentifier(),
> D.getIdentifierLoc(),
>
> D.getDeclSpec().getSourceRange());
> @@ -4692,8 +4692,8 @@
> assert(DS.getStorageClassSpec() == DeclSpec::SCS_unspecified);
>
> SourceLocation Loc = D.getIdentifierLoc();
> - DeclaratorInfo *DInfo = 0;
> - QualType T = GetTypeForDeclarator(D, S, &DInfo);
> + TypeSourceInfo *TInfo = 0;
> + QualType T = GetTypeForDeclarator(D, S, &TInfo);
>
> // C++ [class.friend]p1
> // A friend of a class is a function or class....
> @@ -4816,7 +4816,7 @@
> }
>
> bool Redeclaration = false;
> - NamedDecl *ND = ActOnFunctionDeclarator(S, D, DC, T, DInfo,
> Previous,
> + NamedDecl *ND = ActOnFunctionDeclarator(S, D, DC, T, TInfo,
> Previous,
> move(TemplateParams),
> IsDefinition,
> Redeclaration);
> @@ -5059,9 +5059,9 @@
> assert(D.getDeclSpec().getStorageClassSpec() !=
> DeclSpec::SCS_typedef &&
> "Parser allowed 'typedef' as storage class of condition
> decl.");
>
> - DeclaratorInfo *DInfo = 0;
> + TypeSourceInfo *TInfo = 0;
> TagDecl *OwnedTag = 0;
> - QualType Ty = GetTypeForDeclarator(D, S, &DInfo, &OwnedTag);
> + QualType Ty = GetTypeForDeclarator(D, S, &TInfo, &OwnedTag);
>
> if (Ty->isFunctionType()) { // The declarator shall not specify a
> function...
> // We exit without creating a
> CXXConditionDeclExpr because a FunctionDecl
>
> Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Sun Dec 6 20:54:59 2009
> @@ -1495,7 +1495,7 @@
> property-
> >getLocation(),
> property-
> >getIdentifier(),
> property->getType(),
> - /*DInfo=*/0,
> + /*TInfo=*/0,
> VarDecl::None,
> 0);
> SetterMethod->setMethodParams(Context, &Argument, 1);
> @@ -1765,7 +1765,7 @@
>
> for (unsigned i = 0, e = Sel.getNumArgs(); i != e; ++i) {
> QualType ArgType;
> - DeclaratorInfo *DI;
> + TypeSourceInfo *DI;
>
> if (ArgInfo[i].Type == 0) {
> ArgType = Context.getObjCIdType();
>
> Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaExpr.cpp Sun Dec 6 20:54:59 2009
> @@ -1713,20 +1713,20 @@
>
> /// \brief Build a sizeof or alignof expression given a type operand.
> Action::OwningExprResult
> -Sema::CreateSizeOfAlignOfExpr(DeclaratorInfo *DInfo,
> +Sema::CreateSizeOfAlignOfExpr(TypeSourceInfo *TInfo,
> SourceLocation OpLoc,
> bool isSizeOf, SourceRange R) {
> - if (!DInfo)
> + if (!TInfo)
> return ExprError();
>
> - QualType T = DInfo->getType();
> + QualType T = TInfo->getType();
>
> if (!T->isDependentType() &&
> CheckSizeOfAlignOfOperand(T, OpLoc, R, isSizeOf))
> return ExprError();
>
> // C99 6.5.3.4p4: the type (an unsigned integer type) is size_t.
> - return Owned(new (Context) SizeOfAlignOfExpr(isSizeOf, DInfo,
> + return Owned(new (Context) SizeOfAlignOfExpr(isSizeOf, TInfo,
>
> Context.getSizeType(), OpLoc,
> R.getEnd()));
> }
> @@ -1768,9 +1768,9 @@
> if (TyOrEx == 0) return ExprError();
>
> if (isType) {
> - DeclaratorInfo *DInfo;
> - (void) GetTypeFromParser(TyOrEx, &DInfo);
> - return CreateSizeOfAlignOfExpr(DInfo, OpLoc, isSizeof, ArgRange);
> + TypeSourceInfo *TInfo;
> + (void) GetTypeFromParser(TyOrEx, &TInfo);
> + return CreateSizeOfAlignOfExpr(TInfo, OpLoc, isSizeof, ArgRange);
> }
>
> Expr *ArgEx = (Expr *)TyOrEx;
>
> Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Sun Dec 6 20:54:59 2009
> @@ -321,9 +321,9 @@
> }
> }
>
> - //FIXME: Store DeclaratorInfo in CXXNew expression.
> - DeclaratorInfo *DInfo = 0;
> - QualType AllocType = GetTypeForDeclarator(D, /*Scope=*/0, &DInfo);
> + //FIXME: Store TypeSourceInfo in CXXNew expression.
> + TypeSourceInfo *TInfo = 0;
> + QualType AllocType = GetTypeForDeclarator(D, /*Scope=*/0, &TInfo);
> if (D.isInvalidType())
> return ExprError();
>
> @@ -760,10 +760,10 @@
> &BadAllocType);
> FunctionDecl *Alloc =
> FunctionDecl::Create(Context, GlobalCtx, SourceLocation(), Name,
> - FnType, /*DInfo=*/0, FunctionDecl::None,
> false, true);
> + FnType, /*TInfo=*/0, FunctionDecl::None,
> false, true);
> Alloc->setImplicit();
> ParmVarDecl *Param = ParmVarDecl::Create(Context, Alloc,
> SourceLocation(),
> - 0, Argument, /*DInfo=*/0,
> + 0, Argument, /*TInfo=*/0,
> VarDecl::None, 0);
> Alloc->setParams(Context, &Param, 1);
>
>
> Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaTemplate.cpp Sun Dec 6 20:54:59 2009
> @@ -330,10 +330,10 @@
>
> switch (Arg.getKind()) {
> case ParsedTemplateArgument::Type: {
> - DeclaratorInfo *DI;
> + TypeSourceInfo *DI;
> QualType T = SemaRef.GetTypeFromParser(Arg.getAsType(), &DI);
> if (!DI)
> - DI = SemaRef.Context.getTrivialDeclaratorInfo(T,
> Arg.getLocation());
> + DI = SemaRef.Context.getTrivialTypeSourceInfo(T,
> Arg.getLocation());
> return TemplateArgumentLoc(TemplateArgument(T), DI);
> }
>
> @@ -419,10 +419,10 @@
> TemplateTypeParmDecl *Parm
> = cast<TemplateTypeParmDecl>(TypeParam.getAs<Decl>());
>
> - DeclaratorInfo *DefaultDInfo;
> - GetTypeFromParser(DefaultT, &DefaultDInfo);
> + TypeSourceInfo *DefaultTInfo;
> + GetTypeFromParser(DefaultT, &DefaultTInfo);
>
> - assert(DefaultDInfo && "expected source information for type");
> + assert(DefaultTInfo && "expected source information for type");
>
> // C++0x [temp.param]p9:
> // A default template-argument may be specified for any kind of
> @@ -437,12 +437,12 @@
> // FIXME: Implement this check! Needs a recursive walk over the
> types.
>
> // Check the template argument itself.
> - if (CheckTemplateArgument(Parm, DefaultDInfo)) {
> + if (CheckTemplateArgument(Parm, DefaultTInfo)) {
> Parm->setInvalidDecl();
> return;
> }
>
> - Parm->setDefaultArgument(DefaultDInfo, false);
> + Parm->setDefaultArgument(DefaultTInfo, false);
> }
>
> /// \brief Check that the type of a non-type template parameter is
> @@ -496,8 +496,8 @@
> Sema::DeclPtrTy Sema::ActOnNonTypeTemplateParameter(Scope *S,
> Declarator &D,
> unsigned Depth,
> unsigned
> Position) {
> - DeclaratorInfo *DInfo = 0;
> - QualType T = GetTypeForDeclarator(D, S, &DInfo);
> + TypeSourceInfo *TInfo = 0;
> + QualType T = GetTypeForDeclarator(D, S, &TInfo);
>
> assert(S->isTemplateParamScope() &&
> "Non-type template parameter not in template parameter
> scope!");
> @@ -519,7 +519,7 @@
>
> NonTypeTemplateParmDecl *Param
> = NonTypeTemplateParmDecl::Create(Context, CurContext,
> D.getIdentifierLoc(),
> - Depth, Position, ParamName,
> T, DInfo);
> + Depth, Position, ParamName,
> T, TInfo);
> if (Invalid)
> Param->setInvalidDecl();
>
> @@ -1385,7 +1385,7 @@
> if (Result.isNull())
> return true;
>
> - DeclaratorInfo *DI = Context.CreateDeclaratorInfo(Result);
> + TypeSourceInfo *DI = Context.CreateTypeSourceInfo(Result);
> TemplateSpecializationTypeLoc TL
> = cast<TemplateSpecializationTypeLoc>(DI->getTypeLoc());
> TL.setTemplateNameLoc(TemplateLoc);
> @@ -1405,7 +1405,7 @@
> return Sema::TypeResult();
>
> // FIXME: preserve source info, ideally without copying the DI.
> - DeclaratorInfo *DI;
> + TypeSourceInfo *DI;
> QualType Type = GetTypeFromParser(TypeResult.get(), &DI);
>
> // Verify the tag specifier.
> @@ -1591,7 +1591,7 @@
> return true;
> }
>
> - if (CheckTemplateArgument(Param, AL.getSourceDeclaratorInfo()))
> + if (CheckTemplateArgument(Param, AL.getTypeSourceInfo()))
> return true;
>
> // Add the converted template type argument.
> @@ -1622,14 +1622,14 @@
> /// parameters that precede \p Param in the template parameter list.
> ///
> /// \returns the substituted template argument, or NULL if an error
> occurred.
> -static DeclaratorInfo *
> +static TypeSourceInfo *
> SubstDefaultTemplateArgument(Sema &SemaRef,
> TemplateDecl *Template,
> SourceLocation TemplateLoc,
> SourceLocation RAngleLoc,
> TemplateTypeParmDecl *Param,
> TemplateArgumentListBuilder &Converted) {
> - DeclaratorInfo *ArgType = Param->getDefaultArgumentInfo();
> + TypeSourceInfo *ArgType = Param->getDefaultArgumentInfo();
>
> // If the argument type is dependent, instantiate it now based
> // on the previously-computed template arguments.
> @@ -1755,7 +1755,7 @@
> if (!TypeParm->hasDefaultArgument())
> return TemplateArgumentLoc();
>
> - DeclaratorInfo *DI = SubstDefaultTemplateArgument(*this,
> Template,
> + TypeSourceInfo *DI = SubstDefaultTemplateArgument(*this,
> Template,
> TemplateLoc,
> RAngleLoc,
> TypeParm,
> @@ -2072,7 +2072,7 @@
> break;
> }
>
> - DeclaratorInfo *ArgType = SubstDefaultTemplateArgument(*this,
> + TypeSourceInfo *ArgType = SubstDefaultTemplateArgument(*this,
> Template,
>
> TemplateLoc,
>
> RAngleLoc,
> @@ -2144,8 +2144,8 @@
> /// This routine implements the semantics of C++ [temp.arg.type]. It
> /// returns true if an error occurred, and false otherwise.
> bool Sema::CheckTemplateArgument(TemplateTypeParmDecl *Param,
> - DeclaratorInfo *ArgInfo) {
> - assert(ArgInfo && "invalid DeclaratorInfo");
> + TypeSourceInfo *ArgInfo) {
> + assert(ArgInfo && "invalid TypeSourceInfo");
> QualType Arg = ArgInfo->getType();
>
> // C++ [temp.arg.type]p2:
>
> Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp Sun Dec 6
> 20:54:59 2009
> @@ -544,7 +544,7 @@
> /// \brief Rebuild the exception declaration and register the
> declaration
> /// as an instantiated local.
> VarDecl *RebuildExceptionDecl(VarDecl *ExceptionDecl, QualType T,
> - DeclaratorInfo *Declarator,
> + TypeSourceInfo *Declarator,
> IdentifierInfo *Name,
> SourceLocation Loc, SourceRange
> TypeRange);
>
> @@ -632,7 +632,7 @@
> VarDecl *
> TemplateInstantiator::RebuildExceptionDecl(VarDecl *ExceptionDecl,
> QualType T,
> - DeclaratorInfo
> *Declarator,
> + TypeSourceInfo
> *Declarator,
> IdentifierInfo *Name,
> SourceLocation Loc,
> SourceRange TypeRange) {
> @@ -889,7 +889,7 @@
> ///
> /// \returns If the instantiation succeeds, the instantiated
> /// type. Otherwise, produces diagnostics and returns a NULL type.
> -DeclaratorInfo *Sema::SubstType(DeclaratorInfo *T,
> +TypeSourceInfo *Sema::SubstType(TypeSourceInfo *T,
> const MultiLevelTemplateArgumentList
> &Args,
> SourceLocation Loc,
> DeclarationName Entity) {
>
> Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Sun Dec 6
> 20:54:59 2009
> @@ -127,13 +127,13 @@
>
> Decl *TemplateDeclInstantiator::VisitTypedefDecl(TypedefDecl *D) {
> bool Invalid = false;
> - DeclaratorInfo *DI = D->getTypeDeclaratorInfo();
> + TypeSourceInfo *DI = D->getTypeSourceInfo();
> if (DI->getType()->isDependentType()) {
> DI = SemaRef.SubstType(DI, TemplateArgs,
> D->getLocation(), D->getDeclName());
> if (!DI) {
> Invalid = true;
> - DI =
> SemaRef.Context.getTrivialDeclaratorInfo(SemaRef.Context.IntTy);
> + DI =
> SemaRef.Context.getTrivialTypeSourceInfo(SemaRef.Context.IntTy);
> }
> }
>
> @@ -151,7 +151,7 @@
>
> Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D) {
> // Do substitution on the type of the declaration
> - DeclaratorInfo *DI = SemaRef.SubstType(D->getDeclaratorInfo(),
> + TypeSourceInfo *DI = SemaRef.SubstType(D->getTypeSourceInfo(),
> TemplateArgs,
> D->getTypeSpecStartLoc(),
> D->getDeclName());
> @@ -251,12 +251,12 @@
>
> Decl *TemplateDeclInstantiator::VisitFieldDecl(FieldDecl *D) {
> bool Invalid = false;
> - DeclaratorInfo *DI = D->getDeclaratorInfo();
> + TypeSourceInfo *DI = D->getTypeSourceInfo();
> if (DI->getType()->isDependentType()) {
> DI = SemaRef.SubstType(DI, TemplateArgs,
> D->getLocation(), D->getDeclName());
> if (!DI) {
> - DI = D->getDeclaratorInfo();
> + DI = D->getTypeSourceInfo();
> Invalid = true;
> } else if (DI->getType()->isFunctionType()) {
> // C++ [temp.arg.type]p3:
> @@ -646,7 +646,7 @@
> TemplateArgs);
> FunctionDecl *Function =
> FunctionDecl::Create(SemaRef.Context, DC, D->getLocation(),
> - D->getDeclName(), T, D-
> >getDeclaratorInfo(),
> + D->getDeclName(), T, D-
> >getTypeSourceInfo(),
> D->getStorageClass(),
> D->isInlineSpecified(), D-
> >hasWrittenPrototype());
> Function->setLexicalDeclContext(Owner);
> @@ -779,7 +779,7 @@
> Method = CXXConstructorDecl::Create(SemaRef.Context, Record,
> Constructor->getLocation(),
> Name, T,
> - Constructor-
> >getDeclaratorInfo(),
> + Constructor-
> >getTypeSourceInfo(),
> Constructor->isExplicit(),
> Constructor-
> >isInlineSpecified(), false);
> } else if (CXXDestructorDecl *Destructor =
> dyn_cast<CXXDestructorDecl>(D)) {
> @@ -797,12 +797,12 @@
> ConvTy
> );
> Method = CXXConversionDecl::Create(SemaRef.Context, Record,
> Conversion->getLocation(),
> Name,
> - T, Conversion-
> >getDeclaratorInfo(),
> + T, Conversion-
> >getTypeSourceInfo(),
> Conversion-
> >isInlineSpecified(),
> Conversion->isExplicit());
> } else {
> Method = CXXMethodDecl::Create(SemaRef.Context, Record, D-
> >getLocation(),
> - D->getDeclName(), T, D-
> >getDeclaratorInfo(),
> + D->getDeclName(), T, D-
> >getTypeSourceInfo(),
> D->isStatic(), D-
> >isInlineSpecified());
> }
>
> @@ -895,7 +895,7 @@
>
> ParmVarDecl *TemplateDeclInstantiator::VisitParmVarDecl(ParmVarDecl
> *D) {
> QualType T;
> - DeclaratorInfo *DI = D->getDeclaratorInfo();
> + TypeSourceInfo *DI = D->getTypeSourceInfo();
> if (DI) {
> DI = SemaRef.SubstType(DI, TemplateArgs, D->getLocation(),
> D->getDeclName());
> @@ -957,7 +957,7 @@
>
> NonTypeTemplateParmDecl *D) {
> // Substitute into the type of the non-type template parameter.
> QualType T;
> - DeclaratorInfo *DI = D->getDeclaratorInfo();
> + TypeSourceInfo *DI = D->getTypeSourceInfo();
> if (DI) {
> DI = SemaRef.SubstType(DI, TemplateArgs, D->getLocation(),
> D->getDeclName());
> @@ -1673,16 +1673,16 @@
> MemInitResult NewInit;
>
> if (Init->isBaseInitializer()) {
> - DeclaratorInfo *BaseDInfo = SubstType(Init->getBaseClassInfo(),
> + TypeSourceInfo *BaseTInfo = SubstType(Init->getBaseClassInfo(),
> TemplateArgs,
> Init->getSourceLocation(),
> New->getDeclName());
> - if (!BaseDInfo) {
> + if (!BaseTInfo) {
> New->setInvalidDecl();
> continue;
> }
>
> - NewInit = BuildBaseInitializer(BaseDInfo->getType(), BaseDInfo,
> + NewInit = BuildBaseInitializer(BaseTInfo->getType(), BaseTInfo,
> (Expr **)NewArgs.data(),
> NewArgs.size(),
> Init->getLParenLoc(),
>
> Modified: cfe/trunk/lib/Sema/SemaType.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Sema/SemaType.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaType.cpp Sun Dec 6 20:54:59 2009
> @@ -846,20 +846,20 @@
> return Context.getQualifiedType(Context.getBlockPointerType(T),
> Quals);
> }
>
> -QualType Sema::GetTypeFromParser(TypeTy *Ty, DeclaratorInfo
> **DInfo) {
> +QualType Sema::GetTypeFromParser(TypeTy *Ty, TypeSourceInfo
> **TInfo) {
> QualType QT = QualType::getFromOpaquePtr(Ty);
> if (QT.isNull()) {
> - if (DInfo) *DInfo = 0;
> + if (TInfo) *TInfo = 0;
> return QualType();
> }
>
> - DeclaratorInfo *DI = 0;
> + TypeSourceInfo *DI = 0;
> if (LocInfoType *LIT = dyn_cast<LocInfoType>(QT)) {
> QT = LIT->getType();
> - DI = LIT->getDeclaratorInfo();
> + DI = LIT->getTypeSourceInfo();
> }
>
> - if (DInfo) *DInfo = DI;
> + if (TInfo) *TInfo = DI;
> return QT;
> }
>
> @@ -870,7 +870,7 @@
> /// owns the declaration of a type (e.g., the definition of a struct
> /// type), then *OwnedDecl will receive the owned declaration.
> QualType Sema::GetTypeForDeclarator(Declarator &D, Scope *S,
> - DeclaratorInfo **DInfo,
> + TypeSourceInfo **TInfo,
> TagDecl **OwnedDecl) {
> // Determine the type of the declarator. Not all forms of declarator
> // have a type.
> @@ -1259,11 +1259,11 @@
> if (const AttributeList *Attrs = D.getAttributes())
> ProcessTypeAttributeList(T, Attrs);
>
> - if (DInfo) {
> + if (TInfo) {
> if (D.isInvalidType())
> - *DInfo = 0;
> + *TInfo = 0;
> else
> - *DInfo = GetDeclaratorInfoForDeclarator(D, T);
> + *TInfo = GetTypeSourceInfoForDeclarator(D, T);
> }
>
> return T;
> @@ -1329,18 +1329,18 @@
> }
> }
> void
> VisitTemplateSpecializationTypeLoc(TemplateSpecializationTypeLoc TL) {
> - DeclaratorInfo *DInfo = 0;
> - Sema::GetTypeFromParser(DS.getTypeRep(), &DInfo);
> + TypeSourceInfo *TInfo = 0;
> + Sema::GetTypeFromParser(DS.getTypeRep(), &TInfo);
>
> // If we got no declarator info from previous Sema routines,
> // just fill with the typespec loc.
> - if (!DInfo) {
> + if (!TInfo) {
> TL.initialize(DS.getTypeSpecTypeLoc());
> return;
> }
>
> TemplateSpecializationTypeLoc OldTL =
> - cast<TemplateSpecializationTypeLoc>(DInfo->getTypeLoc());
> + cast<TemplateSpecializationTypeLoc>(TInfo->getTypeLoc());
> TL.copy(OldTL);
> }
> void VisitTypeLoc(TypeLoc TL) {
> @@ -1416,13 +1416,13 @@
> };
> }
>
> -/// \brief Create and instantiate a DeclaratorInfo with type source
> information.
> +/// \brief Create and instantiate a TypeSourceInfo with type source
> information.
> ///
> /// \param T QualType referring to the type as written in source code.
> -DeclaratorInfo *
> -Sema::GetDeclaratorInfoForDeclarator(Declarator &D, QualType T) {
> - DeclaratorInfo *DInfo = Context.CreateDeclaratorInfo(T);
> - UnqualTypeLoc CurrTL = DInfo->getTypeLoc().getUnqualifiedLoc();
> +TypeSourceInfo *
> +Sema::GetTypeSourceInfoForDeclarator(Declarator &D, QualType T) {
> + TypeSourceInfo *TInfo = Context.CreateTypeSourceInfo(T);
> + UnqualTypeLoc CurrTL = TInfo->getTypeLoc().getUnqualifiedLoc();
>
> for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {
> DeclaratorLocFiller(D.getTypeObject(i)).Visit(CurrTL);
> @@ -1431,16 +1431,16 @@
>
> TypeSpecLocFiller(D.getDeclSpec()).Visit(CurrTL);
>
> - return DInfo;
> + return TInfo;
> }
>
> -/// \brief Create a LocInfoType to hold the given QualType and
> DeclaratorInfo.
> -QualType Sema::CreateLocInfoType(QualType T, DeclaratorInfo *DInfo) {
> +/// \brief Create a LocInfoType to hold the given QualType and
> TypeSourceInfo.
> +QualType Sema::CreateLocInfoType(QualType T, TypeSourceInfo *TInfo) {
> // FIXME: LocInfoTypes are "transient", only needed for passing to/
> from Parser
> // and Sema during declaration parsing. Try deallocating/caching
> them when
> // it's appropriate, instead of allocating them and keeping them
> around.
> LocInfoType *LocT =
> (LocInfoType*)BumpAlloc.Allocate(sizeof(LocInfoType), 8);
> - new (LocT) LocInfoType(T, DInfo);
> + new (LocT) LocInfoType(T, TInfo);
> assert(LocT->getTypeClass() != T->getTypeClass() &&
> "LocInfoType's TypeClass conflicts with an existing Type
> class");
> return QualType(LocT, 0);
> @@ -1515,9 +1515,9 @@
> // the parser.
> assert(D.getIdentifier() == 0 && "Type name should have no
> identifier!");
>
> - DeclaratorInfo *DInfo = 0;
> + TypeSourceInfo *TInfo = 0;
> TagDecl *OwnedTag = 0;
> - QualType T = GetTypeForDeclarator(D, S, &DInfo, &OwnedTag);
> + QualType T = GetTypeForDeclarator(D, S, &TInfo, &OwnedTag);
> if (D.isInvalidType())
> return true;
>
> @@ -1534,8 +1534,8 @@
> << Context.getTypeDeclType(OwnedTag);
> }
>
> - if (DInfo)
> - T = CreateLocInfoType(T, DInfo);
> + if (TInfo)
> + T = CreateLocInfoType(T, TInfo);
>
> return T.getAsOpaquePtr();
> }
>
> Modified: cfe/trunk/lib/Sema/TreeTransform.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=90743&r1=90742&r2=90743&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Sema/TreeTransform.h (original)
> +++ cfe/trunk/lib/Sema/TreeTransform.h Sun Dec 6 20:54:59 2009
> @@ -175,10 +175,10 @@
> /// \brief Transforms the given type into another type.
> ///
> /// By default, this routine transforms a type by creating a
> - /// DeclaratorInfo for it and delegating to the appropriate
> + /// TypeSourceInfo for it and delegating to the appropriate
> /// function. This is expensive, but we don't mind, because
> /// this method is deprecated anyway; all users should be
> - /// switched to storing DeclaratorInfos.
> + /// switched to storing TypeSourceInfos.
> ///
> /// \returns the transformed type.
> QualType TransformType(QualType T);
> @@ -191,7 +191,7 @@
> /// may override this function (to take over all type
> /// transformations) or some set of the TransformXXXType functions
> /// to alter the transformation.
> - DeclaratorInfo *TransformType(DeclaratorInfo *DI);
> + TypeSourceInfo *TransformType(TypeSourceInfo *DI);
>
> /// \brief Transform the given type-with-location into a new
> /// type, collecting location information in the given builder
> @@ -301,9 +301,9 @@
> void InventTemplateArgumentLoc(const TemplateArgument &Arg,
> TemplateArgumentLoc &ArgLoc);
>
> - /// \brief Fakes up a DeclaratorInfo for a type.
> - DeclaratorInfo *InventDeclaratorInfo(QualType T) {
> - return SemaRef.Context.getTrivialDeclaratorInfo(T,
> + /// \brief Fakes up a TypeSourceInfo for a type.
> + TypeSourceInfo *InventTypeSourceInfo(QualType T) {
> + return SemaRef.Context.getTrivialTypeSourceInfo(T,
> getDerived().getBaseLocation());
> }
>
> @@ -783,7 +783,7 @@
> /// By default, performs semantic analysis to build the new
> decaration.
> /// Subclasses may override this routine to provide different
> behavior.
> VarDecl *RebuildExceptionDecl(VarDecl *ExceptionDecl, QualType T,
> - DeclaratorInfo *Declarator,
> + TypeSourceInfo *Declarator,
> IdentifierInfo *Name,
> SourceLocation Loc,
> SourceRange TypeRange) {
> @@ -894,10 +894,10 @@
> ///
> /// By default, performs semantic analysis to build the new
> expression.
> /// Subclasses may override this routine to provide different
> behavior.
> - OwningExprResult RebuildSizeOfAlignOf(DeclaratorInfo *DInfo,
> + OwningExprResult RebuildSizeOfAlignOf(TypeSourceInfo *TInfo,
> SourceLocation OpLoc,
> bool isSizeOf, SourceRange
> R) {
> - return getSema().CreateSizeOfAlignOfExpr(DInfo, OpLoc,
> isSizeOf, R);
> + return getSema().CreateSizeOfAlignOfExpr(TInfo, OpLoc,
> isSizeOf, R);
> }
>
> /// \brief Build a new sizeof or alignof expression with an
> expression
> @@ -1890,7 +1890,7 @@
>
> case TemplateArgument::Type:
> Output = TemplateArgumentLoc(Arg,
> -
> SemaRef.Context.getTrivialDeclaratorInfo(Arg.getAsType(), Loc));
> +
> SemaRef.Context.getTrivialTypeSourceInfo(Arg.getAsType(), Loc));
>
> break;
>
> @@ -1922,9 +1922,9 @@
> return false;
>
> case TemplateArgument::Type: {
> - DeclaratorInfo *DI = Input.getSourceDeclaratorInfo();
> + TypeSourceInfo *DI = Input.getTypeSourceInfo();
> if (DI == NULL)
> - DI = InventDeclaratorInfo(Input.getArgument().getAsType());
> + DI = InventTypeSourceInfo(Input.getArgument().getAsType());
>
> DI = getDerived().TransformType(DI);
> if (!DI) return true;
> @@ -2031,10 +2031,10 @@
>
> // Temporary workaround. All of these transformations should
> // eventually turn into transformations on TypeLocs.
> - DeclaratorInfo *DI = getSema().Context.CreateDeclaratorInfo(T);
> + TypeSourceInfo *DI = getSema().Context.CreateTypeSourceInfo(T);
> DI->getTypeLoc().initialize(getDerived().getBaseLocation());
>
> - DeclaratorInfo *NewDI = getDerived().TransformType(DI);
> + TypeSourceInfo *NewDI = getDerived().TransformType(DI);
>
> if (!NewDI)
> return QualType();
> @@ -2043,7 +2043,7 @@
> }
>
> template<typename Derived>
> -DeclaratorInfo
> *TreeTransform<Derived>::TransformType(DeclaratorInfo *DI) {
> +TypeSourceInfo
> *TreeTransform<Derived>::TransformType(TypeSourceInfo *DI) {
> if (getDerived().AlreadyTransformed(DI->getType()))
> return DI;
>
> @@ -2056,7 +2056,7 @@
> if (Result.isNull())
> return 0;
>
> - return TLB.getDeclaratorInfo(SemaRef.Context, Result);
> + return TLB.getTypeSourceInfo(SemaRef.Context, Result);
> }
>
> template<typename Derived>
> @@ -2504,10 +2504,10 @@
> ParmVarDecl *NewParm;
>
> if (OldParm) {
> - DeclaratorInfo *OldDI = OldParm->getDeclaratorInfo();
> + TypeSourceInfo *OldDI = OldParm->getTypeSourceInfo();
> assert(OldDI->getType() == T->getArgType(i));
>
> - DeclaratorInfo *NewDI = getDerived().TransformType(OldDI);
> + TypeSourceInfo *NewDI = getDerived().TransformType(OldDI);
> if (!NewDI)
> return QualType();
>
> @@ -2660,7 +2660,7 @@
> TypeOfTypeLoc
> TL) {
> TypeOfType *T = TL.getTypePtr();
>
> - // FIXME: should be an inner type, or at least have a
> DeclaratorInfo.
> + // FIXME: should be an inner type, or at least have a
> TypeSourceInfo.
> QualType Underlying = getDerived().TransformType(T-
> >getUnderlyingType());
> if (Underlying.isNull())
> return QualType();
> @@ -3402,7 +3402,7 @@
>
> Var = getDerived().RebuildExceptionDecl(ExceptionDecl,
> T,
> - ExceptionDecl-
> >getDeclaratorInfo(),
> + ExceptionDecl-
> >getTypeSourceInfo(),
> ExceptionDecl-
> >getIdentifier(),
> ExceptionDecl-
> >getLocation(),
> /*FIXME: Inaccurate*/
> @@ -3583,9 +3583,9 @@
> TreeTransform<Derived>::TransformSizeOfAlignOfExpr(SizeOfAlignOfExpr
> *E,
> bool
> isAddressOfOperand) {
> if (E->isArgumentType()) {
> - DeclaratorInfo *OldT = E->getArgumentTypeInfo();
> + TypeSourceInfo *OldT = E->getArgumentTypeInfo();
>
> - DeclaratorInfo *NewT = getDerived().TransformType(OldT);
> + TypeSourceInfo *NewT = getDerived().TransformType(OldT);
> if (!NewT)
> return SemaRef.ExprError();
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list