From: Douglas Gregor Date: Tue, 17 Nov 2009 21:16:22 +0000 (+0000) Subject: Improve location information when adding conversion candidates X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0a0d1ac3bd993ea998c3ed8134ddc85b22436943;p=clang Improve location information when adding conversion candidates git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89141 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index cae7516012..938a5d769d 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -2645,7 +2645,7 @@ Sema::AddConversionCandidate(CXXConversionDecl *Conversion, // call on the stack and we don't need its arguments to be // well-formed. DeclRefExpr ConversionRef(Conversion, Conversion->getType(), - SourceLocation()); + From->getLocStart()); ImplicitCastExpr ConversionFn(Context.getPointerType(Conversion->getType()), CastExpr::CK_FunctionToPointerDecay, &ConversionRef, false); @@ -2655,7 +2655,7 @@ Sema::AddConversionCandidate(CXXConversionDecl *Conversion, // allocator). CallExpr Call(Context, &ConversionFn, 0, 0, Conversion->getConversionType().getNonReferenceType(), - SourceLocation()); + From->getLocStart()); ImplicitConversionSequence ICS = TryCopyInitialization(&Call, ToType, /*SuppressUserConversions=*/true,