[clang] [Clang] Clarify diagnostic notes for implicitly generated deduction guides (PR #96084)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 21 00:56:23 PDT 2024
================
@@ -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,
----------------
hokein wrote:
Any reason to filter out the "explicit constructor" case? We still synthesize a deduction guide from a constructor, and they are not identical, e.g. its template parameters is a combination of template parameters of the class and template parameters of the corresponding constructor. I think it is useful to print them as well.
I think a simple model here would be that we always print synthesized deduction guides (this covers the using-alias case.)
https://github.com/llvm/llvm-project/pull/96084
More information about the cfe-commits
mailing list