print a type in a diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59829 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index ace5bcd..7c4c15e 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -1347,7 +1347,7 @@
     const PointerType *PT = Fn->getType()->getAsPointerType();
     if (PT == 0)
       return Diag(LParenLoc, diag::err_typecheck_call_not_function)
-        << Fn->getSourceRange();
+        << Fn->getType().getAsString() << Fn->getSourceRange();
     FuncT = PT->getPointeeType()->getAsFunctionType();
   } else { // This is a block call.
     FuncT = Fn->getType()->getAsBlockPointerType()->getPointeeType()->
@@ -1355,7 +1355,7 @@
   }
   if (FuncT == 0)
     return Diag(LParenLoc, diag::err_typecheck_call_not_function)
-      << Fn->getSourceRange();
+      << Fn->getType().getAsString() << Fn->getSourceRange();
   
   // We know the result type of the call, set it.
   TheCall->setType(FuncT->getResultType().getNonReferenceType());