Change a whole lot of diagnostics to take QualType's directly 
instead of converting them to strings first.  This also fixes a
bunch of minor inconsistencies in the diagnostics emitted by clang
and adds a bunch of FIXME's to DiagnosticKinds.def.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59948 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index b99f2e0..ab8ae72 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -351,7 +351,7 @@
       //   derived class more than once.
       Diag(BaseSpecs[idx]->getSourceRange().getBegin(),
            diag::err_duplicate_base_class)
-        << KnownBaseTypes[NewBaseType]->getType().getAsString()
+        << KnownBaseTypes[NewBaseType]->getType()
         << BaseSpecs[idx]->getSourceRange();
 
       // Delete the duplicate base class specifier; we're going to
@@ -1212,13 +1212,13 @@
     ConvType = Context.getCanonicalType(ConvType).getUnqualifiedType();
     if (ConvType == ClassType)
       Diag(Conversion->getLocation(), diag::warn_conv_to_self_not_used)
-        << ClassType.getAsString();
+        << ClassType;
     else if (IsDerivedFrom(ClassType, ConvType))
       Diag(Conversion->getLocation(), diag::warn_conv_to_base_not_used)
-        <<  ClassType.getAsString() << ConvType.getAsString();
+        <<  ClassType << ConvType;
   } else if (ConvType->isVoidType()) {
     Diag(Conversion->getLocation(), diag::warn_conv_to_void_not_used)
-      << ClassType.getAsString() << ConvType.getAsString();
+      << ClassType << ConvType;
   }
 
   ClassDecl->addConversionFunction(Context, Conversion);
@@ -1691,9 +1691,8 @@
     if (!ICS)
       Diag(Init->getSourceRange().getBegin(),
            diag::err_not_reference_to_const_init)
-        <<  T1.getAsString()
-        << (InitLvalue != Expr::LV_Valid? "temporary" : "value")
-        <<  T2.getAsString() << Init->getSourceRange();
+        << T1 << (InitLvalue != Expr::LV_Valid? "temporary" : "value")
+        << T2 << Init->getSourceRange();
     return true;
   }
 
@@ -1755,9 +1754,8 @@
     if (!ICS)
       Diag(Init->getSourceRange().getBegin(),
            diag::err_reference_init_drops_quals)
-        << T1.getAsString()
-        << (InitLvalue != Expr::LV_Valid? "temporary" : "value")
-        << T2.getAsString() << Init->getSourceRange();
+        << T1 << (InitLvalue != Expr::LV_Valid? "temporary" : "value")
+        << T2 << Init->getSourceRange();
     return true;
   }
 
@@ -1915,7 +1913,7 @@
     if (!ParamIsInt)
       return Diag(LastParam->getLocation(),
                   diag::err_operator_overload_post_incdec_must_be_int) 
-        << LastParam->getType().getAsString() << (Op == OO_MinusMinus);
+        << LastParam->getType() << (Op == OO_MinusMinus);
   }
 
   return false;