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/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp
index 811f9ed..aae2014 100644
--- a/lib/Frontend/PCHReader.cpp
+++ b/lib/Frontend/PCHReader.cpp
@@ -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++]),
diff --git a/lib/Frontend/PCHReaderDecl.cpp b/lib/Frontend/PCHReaderDecl.cpp
index 03f3b47..40d48c5 100644
--- a/lib/Frontend/PCHReaderDecl.cpp
+++ b/lib/Frontend/PCHReaderDecl.cpp
@@ -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) {
diff --git a/lib/Frontend/PCHReaderStmt.cpp b/lib/Frontend/PCHReaderStmt.cpp
index 4a3510c..b2fc644 100644
--- a/lib/Frontend/PCHReaderStmt.cpp
+++ b/lib/Frontend/PCHReaderStmt.cpp
@@ -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++]));
diff --git a/lib/Frontend/PCHWriter.cpp b/lib/Frontend/PCHWriter.cpp
index 0e6d1d2..a190013 100644
--- a/lib/Frontend/PCHWriter.cpp
+++ b/lib/Frontend/PCHWriter.cpp
@@ -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);  
 }
 
diff --git a/lib/Frontend/PCHWriterDecl.cpp b/lib/Frontend/PCHWriterDecl.cpp
index 64b1aaf..1ba113e 100644
--- a/lib/Frontend/PCHWriterDecl.cpp
+++ b/lib/Frontend/PCHWriterDecl.cpp
@@ -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() &&
diff --git a/lib/Frontend/PCHWriterStmt.cpp b/lib/Frontend/PCHWriterStmt.cpp
index 27b83ed..22f7ad6 100644
--- a/lib/Frontend/PCHWriterStmt.cpp
+++ b/lib/Frontend/PCHWriterStmt.cpp
@@ -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());
diff --git a/lib/Frontend/RewriteObjC.cpp b/lib/Frontend/RewriteObjC.cpp
index cd497a7..df85c13 100644
--- a/lib/Frontend/RewriteObjC.cpp
+++ b/lib/Frontend/RewriteObjC.cpp
@@ -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);
 }