summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-21 18:27:34 +0000
committerChris Lattner <sabre@nondot.org>2008-11-21 18:27:34 +0000
commit40bb0c83d403e6eb43f88ddfe0d3bb5f6ba075cf (patch)
treef077fc8decb997eb252d122d04978b8419a597c6 /clang/lib/Sema/SemaExpr.cpp
parent735a4158d96dfbda71e0ecc275755fafe56a40f1 (diff)
downloadbcm5719-llvm-40bb0c83d403e6eb43f88ddfe0d3bb5f6ba075cf.tar.gz
bcm5719-llvm-40bb0c83d403e6eb43f88ddfe0d3bb5f6ba075cf.zip
print a type in a diagnostic.
llvm-svn: 59829
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index ace5bcd5b70..7c4c15e0dd6 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -1347,7 +1347,7 @@ ActOnCallExpr(ExprTy *fn, SourceLocation LParenLoc,
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 @@ ActOnCallExpr(ExprTy *fn, SourceLocation LParenLoc,
}
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());
OpenPOWER on IntegriCloud