rsmith added a comment. This is an interesting idea. Have you looked into whether you can defer the check for conversion via multiple user-defined conversions until we come to call `CompleteNonViableCandidate` after finding no viable functions? That'd give me a lot more confidence that this won't introduce a noticeable performance regression for pathological cases (eg, considering a quadratic -- or worse -- number of combinations of constructors and conversion functions).
================ Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:4068 + "%diff{from $ to $|from argument type to parameter type}3,4 " + "applies more than one implicit user-defined conversion" + >; ---------------- applies -> would apply ================ Comment at: clang/include/clang/Sema/Sema.h:2947-2956 + enum UserDefinedConversionsKind { + /// Allow user-defined conversions. + UDC_Allow, + + /// Find user-defined conversions but mark as invalid. + UDC_Suppress, + ---------------- Please use an `enum class` here, so that call sites are more meaningful (`UserDefinedConversions::Allow` vs `UDC_Allow`). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74009/new/ https://reviews.llvm.org/D74009 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits