@@ -35,17 +35,17 @@ class TypeLoc;
3535// /
3636// / A client can read the relevant info using TypeLoc wrappers, e.g:
3737// / @code
38- // / TypeLoc TL = DeclaratorInfo ->getTypeLoc();
38+ // / TypeLoc TL = TypeSourceInfo ->getTypeLoc();
3939// / if (PointerLoc *PL = dyn_cast<PointerLoc>(&TL))
4040// / PL->getStarLoc().print(OS, SrcMgr);
4141// / @endcode
4242// /
43- class DeclaratorInfo {
43+ class TypeSourceInfo {
4444 QualType Ty;
4545 // Contains a memory block after the class, used for type source information,
4646 // allocated by ASTContext.
4747 friend class ASTContext ;
48- DeclaratorInfo (QualType ty) : Ty(ty) { }
48+ TypeSourceInfo (QualType ty) : Ty(ty) { }
4949public:
5050 // / \brief Return the type wrapped by this type source info.
5151 QualType getType () const { return Ty; }
@@ -322,18 +322,18 @@ class ValueDecl : public NamedDecl {
322322};
323323
324324// / \brief Represents a ValueDecl that came out of a declarator.
325- // / Contains type source information through DeclaratorInfo .
325+ // / Contains type source information through TypeSourceInfo .
326326class DeclaratorDecl : public ValueDecl {
327- DeclaratorInfo *DeclInfo;
327+ TypeSourceInfo *DeclInfo;
328328
329329protected:
330330 DeclaratorDecl (Kind DK, DeclContext *DC, SourceLocation L,
331- DeclarationName N, QualType T, DeclaratorInfo *DInfo )
332- : ValueDecl(DK, DC, L, N, T), DeclInfo(DInfo ) {}
331+ DeclarationName N, QualType T, TypeSourceInfo *TInfo )
332+ : ValueDecl(DK, DC, L, N, T), DeclInfo(TInfo ) {}
333333
334334public:
335- DeclaratorInfo * getDeclaratorInfo () const { return DeclInfo; }
336- void setDeclaratorInfo (DeclaratorInfo *DInfo ) { DeclInfo = DInfo ; }
335+ TypeSourceInfo * getTypeSourceInfo () const { return DeclInfo; }
336+ void setTypeSourceInfo (TypeSourceInfo *TInfo ) { DeclInfo = TInfo ; }
337337
338338 SourceLocation getTypeSpecStartLoc () const ;
339339
@@ -440,8 +440,8 @@ class VarDecl : public DeclaratorDecl, public Redeclarable<VarDecl> {
440440 friend class StmtIteratorBase ;
441441protected:
442442 VarDecl (Kind DK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id,
443- QualType T, DeclaratorInfo *DInfo , StorageClass SC)
444- : DeclaratorDecl(DK, DC, L, Id, T, DInfo ), Init(),
443+ QualType T, TypeSourceInfo *TInfo , StorageClass SC)
444+ : DeclaratorDecl(DK, DC, L, Id, T, TInfo ), Init(),
445445 ThreadSpecified (false ), HasCXXDirectInit(false ),
446446 DeclaredInCondition(false ) {
447447 SClass = SC;
@@ -461,7 +461,7 @@ class VarDecl : public DeclaratorDecl, public Redeclarable<VarDecl> {
461461
462462 static VarDecl *Create (ASTContext &C, DeclContext *DC,
463463 SourceLocation L, IdentifierInfo *Id,
464- QualType T, DeclaratorInfo *DInfo , StorageClass S);
464+ QualType T, TypeSourceInfo *TInfo , StorageClass S);
465465
466466 virtual ~VarDecl ();
467467 virtual void Destroy (ASTContext& C);
@@ -752,7 +752,7 @@ class ImplicitParamDecl : public VarDecl {
752752protected:
753753 ImplicitParamDecl (Kind DK, DeclContext *DC, SourceLocation L,
754754 IdentifierInfo *Id, QualType Tw)
755- : VarDecl(DK, DC, L, Id, Tw, /* DInfo =*/ 0 , VarDecl::None) {}
755+ : VarDecl(DK, DC, L, Id, Tw, /* TInfo =*/ 0 , VarDecl::None) {}
756756public:
757757 static ImplicitParamDecl *Create (ASTContext &C, DeclContext *DC,
758758 SourceLocation L, IdentifierInfo *Id,
@@ -779,16 +779,16 @@ class ParmVarDecl : public VarDecl {
779779
780780protected:
781781 ParmVarDecl (Kind DK, DeclContext *DC, SourceLocation L,
782- IdentifierInfo *Id, QualType T, DeclaratorInfo *DInfo ,
782+ IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo ,
783783 StorageClass S, Expr *DefArg)
784- : VarDecl(DK, DC, L, Id, T, DInfo , S), objcDeclQualifier(OBJC_TQ_None) {
784+ : VarDecl(DK, DC, L, Id, T, TInfo , S), objcDeclQualifier(OBJC_TQ_None) {
785785 setDefaultArg (DefArg);
786786 }
787787
788788public:
789789 static ParmVarDecl *Create (ASTContext &C, DeclContext *DC,
790790 SourceLocation L,IdentifierInfo *Id,
791- QualType T, DeclaratorInfo *DInfo ,
791+ QualType T, TypeSourceInfo *TInfo ,
792792 StorageClass S, Expr *DefArg);
793793
794794 ObjCDeclQualifier getObjCDeclQualifier () const {
@@ -862,8 +862,8 @@ class ParmVarDecl : public VarDecl {
862862 }
863863
864864 QualType getOriginalType () const {
865- if (getDeclaratorInfo ())
866- return getDeclaratorInfo ()->getType ();
865+ if (getTypeSourceInfo ())
866+ return getTypeSourceInfo ()->getType ();
867867 return getType ();
868868 }
869869
@@ -947,9 +947,9 @@ class FunctionDecl : public DeclaratorDecl, public DeclContext,
947947
948948protected:
949949 FunctionDecl (Kind DK, DeclContext *DC, SourceLocation L,
950- DeclarationName N, QualType T, DeclaratorInfo *DInfo ,
950+ DeclarationName N, QualType T, TypeSourceInfo *TInfo ,
951951 StorageClass S, bool isInline)
952- : DeclaratorDecl(DK, DC, L, N, T, DInfo ),
952+ : DeclaratorDecl(DK, DC, L, N, T, TInfo ),
953953 DeclContext (DK),
954954 ParamInfo(0 ), Body(),
955955 SClass(S), IsInline(isInline),
@@ -976,7 +976,7 @@ class FunctionDecl : public DeclaratorDecl, public DeclContext,
976976
977977 static FunctionDecl *Create (ASTContext &C, DeclContext *DC, SourceLocation L,
978978 DeclarationName N, QualType T,
979- DeclaratorInfo *DInfo ,
979+ TypeSourceInfo *TInfo ,
980980 StorageClass S = None, bool isInline = false ,
981981 bool hasWrittenPrototype = true );
982982
@@ -1312,15 +1312,15 @@ class FieldDecl : public DeclaratorDecl {
13121312 Expr *BitWidth;
13131313protected:
13141314 FieldDecl (Kind DK, DeclContext *DC, SourceLocation L,
1315- IdentifierInfo *Id, QualType T, DeclaratorInfo *DInfo ,
1315+ IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo ,
13161316 Expr *BW, bool Mutable)
1317- : DeclaratorDecl(DK, DC, L, Id, T, DInfo ), Mutable(Mutable), BitWidth(BW) {
1317+ : DeclaratorDecl(DK, DC, L, Id, T, TInfo ), Mutable(Mutable), BitWidth(BW) {
13181318 }
13191319
13201320public:
13211321 static FieldDecl *Create (ASTContext &C, DeclContext *DC, SourceLocation L,
13221322 IdentifierInfo *Id, QualType T,
1323- DeclaratorInfo *DInfo , Expr *BW, bool Mutable);
1323+ TypeSourceInfo *TInfo , Expr *BW, bool Mutable);
13241324
13251325 // / isMutable - Determines whether this field is mutable (C++ only).
13261326 bool isMutable () const { return Mutable; }
@@ -1423,28 +1423,28 @@ class TypeDecl : public NamedDecl {
14231423
14241424class TypedefDecl : public TypeDecl {
14251425 // / UnderlyingType - This is the type the typedef is set to.
1426- DeclaratorInfo *DInfo ;
1426+ TypeSourceInfo *TInfo ;
14271427
14281428 TypedefDecl (DeclContext *DC, SourceLocation L,
1429- IdentifierInfo *Id, DeclaratorInfo *DInfo )
1430- : TypeDecl(Typedef, DC, L, Id), DInfo(DInfo ) {}
1429+ IdentifierInfo *Id, TypeSourceInfo *TInfo )
1430+ : TypeDecl(Typedef, DC, L, Id), TInfo(TInfo ) {}
14311431
14321432 virtual ~TypedefDecl () {}
14331433public:
14341434
14351435 static TypedefDecl *Create (ASTContext &C, DeclContext *DC,
14361436 SourceLocation L, IdentifierInfo *Id,
1437- DeclaratorInfo *DInfo );
1437+ TypeSourceInfo *TInfo );
14381438
1439- DeclaratorInfo * getTypeDeclaratorInfo () const {
1440- return DInfo ;
1439+ TypeSourceInfo * getTypeSourceInfo () const {
1440+ return TInfo ;
14411441 }
14421442
14431443 QualType getUnderlyingType () const {
1444- return DInfo ->getType ();
1444+ return TInfo ->getType ();
14451445 }
1446- void setTypeDeclaratorInfo (DeclaratorInfo *newType) {
1447- DInfo = newType;
1446+ void setTypeSourceInfo (TypeSourceInfo *newType) {
1447+ TInfo = newType;
14481448 }
14491449
14501450 // Implement isa/cast/dyncast/etc.
0 commit comments