Skip to content

Commit 7694e81

Browse files
committed
do not skip templates when initializing by constructors as that might include a conversion
1 parent 3fd24e0 commit 7694e81

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang/include/clang/Sema/Overload.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,9 @@ class Sema;
14481448
// For user defined conversion we need to check against different
14491449
// combination of CV qualifiers and look at any expicit specifier, so
14501450
// always deduce template candidate.
1451-
Kind != CSK_InitByUserDefinedConversion && Kind != CSK_CodeCompletion &&
1451+
Kind != CSK_InitByUserDefinedConversion
1452+
&& Kind != CSK_InitByConstructor
1453+
&& Kind != CSK_CodeCompletion &&
14521454
Opts.CPlusPlus && (!Opts.CUDA || Opts.GPUExcludeWrongSideOverloads);
14531455
}
14541456

0 commit comments

Comments
 (0)