[clang] [clang] Implement instantiation context note for checking template parameters (PR #126088)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 26 08:17:02 PST 2025
================
@@ -5294,10 +5294,14 @@ def err_template_missing_args : Error<
"%select{class template|function template|variable template|alias template|"
"template template parameter|concept|template}0 %1 requires template "
"arguments">;
-def err_template_arg_list_different_arity : Error<
- "%select{too few|too many}0 template arguments for "
+def err_template_param_missing_arg : Error<
+ "missing template argument for template parameter">;
+def err_template_template_param_missing_param : Error<
+ "missing template parameter to bind to template template parameter">;
----------------
mizvekov wrote:
Yeah, the diagnostic should have started with the second note as an error, but this is a different problem, and is out of scope for this patch.
There are too many possible things that can be diagnosed when matching template template parameters, and most of these diagnostics are implemented for problems which occur outside of that context.
My thinking is that we will eventually need to be able to turn errors and warnings into notes, and perform transformations on the sequence of diagnostics depending on the context where they occur.
https://github.com/llvm/llvm-project/pull/126088
More information about the cfe-commits
mailing list