Improve diagnostic location information when checking the initialization of a reference
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82666 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index f500e13..ff6ae50 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -1356,6 +1356,7 @@
// conversion the reference must bind directly to E1.
if (!Self.CheckReferenceInit(From,
Self.Context.getLValueReferenceType(To->getType()),
+ To->getLocStart(),
/*SuppressUserConversions=*/false,
/*AllowExplicit=*/false,
/*ForceRValue=*/false,
@@ -1477,6 +1478,7 @@
// redoing all the work.
return Self.CheckReferenceInit(E, Self.Context.getLValueReferenceType(
TargetType(ICS)),
+ /*FIXME:*/E->getLocStart(),
/*SuppressUserConversions=*/false,
/*AllowExplicit=*/false,
/*ForceRValue=*/false);
@@ -1487,6 +1489,7 @@
"TryClassUnification should never generate indirect ref bindings");
return Self.CheckReferenceInit(E, Self.Context.getLValueReferenceType(
TargetType(ICS)),
+ /*FIXME:*/E->getLocStart(),
/*SuppressUserConversions=*/false,
/*AllowExplicit=*/false,
/*ForceRValue=*/false);