[clang] [Clang][Sema] Fix rejecting valid reference initialization with conversion function templates (PR #233482)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 20 06:55:54 PDT 2026
================
@@ -5361,8 +5361,8 @@ static OverloadingResult TryRefInitWithConversionFunction(
// FIXME: Do we need to make sure that we only consider conversion
// candidates with reference-compatible results? That might be needed to
// break recursion.
- if ((AllowRValues ||
- Conv->getConversionType()->isLValueReferenceType())) {
+ if (ConvTemplate || AllowRValues ||
+ Conv->getConversionType()->isLValueReferenceType()) {
----------------
cor3ntin wrote:
This might be the right fix - I am not completely sure -, however the comment on the code do not agree, so this needs more work.
https://github.com/llvm/llvm-project/pull/233482
More information about the cfe-commits
mailing list