================ @@ -12114,6 +12115,35 @@ static void NoteFunctionCandidate(Sema &S, OverloadCandidate *Cand, return; } + // If this is an implicit deduction guide against an implicitly defined + // constructor, add a note for it. Neither these deduction guides nor their + // corresponding constructors are explicitly spelled in the source code, ---------------- zyn0217 wrote:
Yeah, we would have a deduction guide with combined template parameters; however, my concern is that we already have sufficient code contexts in the snippets of a diagnostic for users to understand the error. For example, ```cpp template <class T> struct Outer { template <class U> struct Inner { template <class V> Inner(U, V, V) {} }; }; Outer<int>::Inner i(42, "hello"); ``` https://clang.godbolt.org/z/1bEfqrrMv we currently have a note followed by a code snippet: ``` <source>:4:2: note: candidate function template not viable: requires 3 arguments, but 2 were provided 4 | Inner(U, V, V) {} | ^ ~~~~~~~ ``` although we don't have the synthesized template parameters presented, I think (subjectively) this is probably already legible. > (this covers the using-alias case.) With the filter currently in place, I have seen a bunch of additional notes following the using-alias cases. However, I'm not sure I have handled them all. https://github.com/llvm/llvm-project/pull/96084 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits