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 '{}' \;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90743 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index f0812bf..29efbd7 100644
--- a/lib/Sema/Sema.cpp
+++ b/lib/Sema/Sema.cpp
@@ -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);
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 2fb3176..e4ee8ce 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -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);
 
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 01314c3..a5314bb 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -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,
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index 2e641d9..23dccdf 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -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;
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index e115095..2df172e 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -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
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 7da37af..7f46d2c 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -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();
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index bb040b2..987de9b 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -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;
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 44f7816..567b488 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -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);
 
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index 8cd1703..3ac6bba 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -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:
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp
index b1a5803..6158acb 100644
--- a/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/lib/Sema/SemaTemplateInstantiate.cpp
@@ -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) {
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 6b41d9a..432217d 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -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(),
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index d1ee596..e79d9ab 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -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();
 }
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h
index 8c251e7..5f2ae60 100644
--- a/lib/Sema/TreeTransform.h
+++ b/lib/Sema/TreeTransform.h
@@ -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();