================
@@ -4870,9 +4870,21 @@ def note_ovl_candidate_inconsistent_deduction_types : 
Note<
     "candidate template ignored: deduced values %diff{"
     "of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|"
     "%1 and %3 of conflicting types for parameter %0}2,4">;
-def note_ovl_candidate_explicit_arg_mismatch_named : Note<
+def note_ovl_candidate_explicit_arg_mismatch_named_temptemppd : Note<
     "candidate template ignored: invalid explicitly-specified argument "
     "for template parameter %0">;
+def note_ovl_candidate_explicit_arg_mismatch_named_ttpd : Note<
+    "candidate template ignored: invalid explicitly-specified argument "
+    "for template parameter %0: "
+    "expected a type, but got value '%1' (of type %2)">;
+def note_ovl_candidate_explicit_arg_mismatch_named_nttpd_b : Note<
+    "candidate template ignored: invalid explicitly-specified argument "
+    "for template parameter %0: "
+    "could not convert '%1' from %2 to %3">;
+def note_ovl_candidate_explicit_arg_mismatch_named_nttpd_a : Note<
+    "candidate template ignored: invalid explicitly-specified argument "
+    "for template parameter %0: "
+    "expected constant of type %1 got type %2">;
----------------
mizvekov wrote:

These can be merged into one diagnostic like so:
```suggestion
def note_ovl_candidate_explicit_arg_mismatch : Note<
    "candidate template ignored: invalid explicitly-specified argument "
    "for template parameter %0%select{|: expected a type, but got value '%1' 
(of type %2)|: could not convert '%1' from %2 to %3|expected constant of type 
%1 got type %2}">;
```
Basically the %select{choice1|choice2} parameter allows you to select one of 
multiple options there.
You can see how this works by looking at the implementation of 
`note_ovl_candidate_illegal_constructor`.

https://github.com/llvm/llvm-project/pull/122754
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to