From: Argyrios Kyrtzidis Date: Tue, 14 Jul 2009 03:19:38 +0000 (+0000) Subject: For C++ overloaded operator calls, set the source location of the DeclRefExpr to... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=812730911edee505015a1ee3b0bf48be7e838532;p=clang For C++ overloaded operator calls, set the source location of the DeclRefExpr to the location of the operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75600 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 4021e547e1..b7f698eb0b 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -4209,7 +4209,7 @@ Sema::CreateOverloadedBinOp(SourceLocation OpLoc, // Build the actual expression node. Expr *FnExpr = new (Context) DeclRefExpr(FnDecl, FnDecl->getType(), - SourceLocation()); + OpLoc); UsualUnaryConversions(FnExpr); return Owned(new (Context) CXXOperatorCallExpr(Context, Op, FnExpr,