]> granicus.if.org Git - clang/commitdiff
Improve location information when adding conversion candidates
authorDouglas Gregor <dgregor@apple.com>
Tue, 17 Nov 2009 21:16:22 +0000 (21:16 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 17 Nov 2009 21:16:22 +0000 (21:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89141 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaOverload.cpp

index cae751601234bf7ffc9e12670715f652171c8ab2..938a5d769dd4159fd10e11dbd48a75308618b519 100644 (file)
@@ -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,