summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index b3e748097e0..2e99b3dfe81 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -951,12 +951,12 @@ ActOnCallExpr(ExprTy *fn, SourceLocation LParenLoc,
// type pointer to function".
const PointerType *PT = Fn->getType()->getAsPointerType();
if (PT == 0)
- return Diag(Fn->getLocStart(), diag::err_typecheck_call_not_function,
- SourceRange(Fn->getLocStart(), RParenLoc));
+ return Diag(LParenLoc, diag::err_typecheck_call_not_function,
+ Fn->getSourceRange());
const FunctionType *FuncT = PT->getPointeeType()->getAsFunctionType();
if (FuncT == 0)
- return Diag(Fn->getLocStart(), diag::err_typecheck_call_not_function,
- SourceRange(Fn->getLocStart(), RParenLoc));
+ return Diag(LParenLoc, diag::err_typecheck_call_not_function,
+ Fn->getSourceRange());
// We know the result type of the call, set it.
TheCall->setType(FuncT->getResultType());
OpenPOWER on IntegriCloud