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/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index f5f05f2..3633da8 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -126,7 +126,7 @@
     //
     if (!RT->getDecl()->isDefinition())
       return Diag(TyBeginLoc, diag::err_invalid_incomplete_type_use)
-        << Ty.getAsString() << FullRange;
+        << Ty << FullRange;
 
     unsigned DiagID = PP.getDiagnostics().getCustomDiagID(Diagnostic::Error,
                                     "class constructors are not supported yet");
@@ -164,7 +164,7 @@
     return Diag(TyBeginLoc, diag::err_value_init_for_array_type) << FullRange;
   if (Ty->isIncompleteType() && !Ty->isVoidType())
     return Diag(TyBeginLoc, diag::err_invalid_incomplete_type_use) 
-      << Ty.getAsString() << FullRange;
+      << Ty << FullRange;
 
   return new CXXZeroInitValueExpr(Ty, TyBeginLoc, RParenLoc);
 }
@@ -302,7 +302,7 @@
       assert(false && "Unexpected type class");
       return true;
     }
-    Diag(StartLoc, msg) << AllocType.getAsString() << TyR;
+    Diag(StartLoc, msg) << AllocType << TyR;
     return true;
   }
 
@@ -340,18 +340,17 @@
   }
 
   if (!Type->isPointerType()) {
-    Diag(StartLoc, diag::err_delete_operand)
-      << Type.getAsString() << Ex->getSourceRange();
+    Diag(StartLoc, diag::err_delete_operand) << Type << Ex->getSourceRange();
     return true;
   }
 
   QualType Pointee = Type->getAsPointerType()->getPointeeType();
   if (Pointee->isIncompleteType() && !Pointee->isVoidType())
     Diag(StartLoc, diag::warn_delete_incomplete)
-      << Pointee.getAsString() << Ex->getSourceRange();
+      << Pointee << Ex->getSourceRange();
   else if (!Pointee->isObjectType()) {
     Diag(StartLoc, diag::err_delete_operand)
-      << Type.getAsString() << Ex->getSourceRange();
+      << Type << Ex->getSourceRange();
     return true;
   }
 
@@ -428,7 +427,7 @@
     ConvTy = CheckSingleAssignmentConstraints(Context.BoolTy, CondExpr);
   if (ConvTy == Incompatible)
     return Diag(CondExpr->getLocStart(), diag::err_typecheck_bool_condition)
-      << Ty.getAsString() << CondExpr->getSourceRange();
+      << Ty << CondExpr->getSourceRange();
   return false;
 }