LLVM/project 4a2467aclang/docs ReleaseNotes.rst, clang/include/clang/Basic DiagnosticSemaKinds.td

[clang] Implement evaluation context for checking template parameters

Instead of manually adding a note pointing to the relevant template
parameter to every relevant error, which is very easy to miss,
this patch adds a new instantiation context note, so that this
can work using RAII magic.

This fixes a bunch of places where these notes were missing, and is
more future-proof.

Some diagnostics are reworked to make better use of this note:
- Errors about missing template arguments now refer to the parameter
  which is missing an argument.
- Template Template parameter mismatches now refer to template
  parameters as parameters instead of arguments.

It's likely this will add the note to some diagnostics where the
parameter is not super relevant, but this can be reworked with time
and the decrease in maintenance burden makes up for it.

This bypasses the templight dumper for the new context entry, as the
tests are very hard to update.

This depends on #125453, which is needed to avoid losing the context
note for errors occuring during template argument deduction.
DeltaFile
+48-93clang/lib/Sema/SemaTemplate.cpp
+31-31clang/test/SemaHLSL/BuiltIns/StructuredBuffers.hlsl
+21-21clang/test/CXX/temp/temp.decls/temp.variadic/fixed-expansion.cpp
+16-16clang/test/SemaTemplate/cwg2398.cpp
+22-9clang/test/CXX/drs/cwg0xx.cpp
+24-6clang/lib/Sema/SemaTemplateInstantiate.cpp
+12-12clang/test/SemaCXX/access-base-class.cpp
+12-12clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp
+16-8clang/lib/Frontend/FrontendActions.cpp
+12-12clang/test/Parser/cxx-template-template-recovery.cpp
+21-2clang/include/clang/Sema/Sema.h
+13-10clang/test/SemaTemplate/default-arguments.cpp
+14-6clang/test/SemaTemplate/temp_arg_nontype.cpp
+10-9clang/test/CXX/drs/cwg18xx.cpp
+12-6clang/test/CXX/temp/temp.arg/temp.arg.type/p2.cpp
+11-5clang/test/CXX/drs/cwg1xx.cpp
+9-6clang/test/SemaTemplate/temp_arg_template.cpp
+10-4clang/lib/Sema/SemaLookup.cpp
+7-7clang/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp
+5-8clang/test/SemaTemplate/temp_arg_template_p0522.cpp
+7-6clang/test/SemaTemplate/instantiation-default-1.cpp
+6-6clang/test/SemaTemplate/instantiate-member-pointers.cpp
+6-6clang/test/SemaTemplate/temp_arg.cpp
+6-6clang/test/CXX/temp/temp.arg/temp.arg.template/p3-0x.cpp
+6-6clang/test/Parser/cxx-template-argument.cpp
+6-5clang/test/SemaCXX/cxx98-compat.cpp
+9-2clang/test/CXX/drs/cwg4xx.cpp
+5-5clang/test/CXX/temp/temp.spec/cxx1y-variable-template-no-body.cpp
+10-0clang/docs/ReleaseNotes.rst
+7-3clang/test/CXX/drs/cwg20xx.cpp
+5-5clang/test/SemaTemplate/temp_arg_nontype_cxx2c.cpp
+5-5clang/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp
+5-5clang/test/Parser/cxx1z-class-template-argument-deduction.cpp
+5-5clang/test/CXX/temp/temp.param/p15-cxx0x.cpp
+7-3clang/include/clang/Basic/DiagnosticSemaKinds.td
+5-4clang/test/SemaTemplate/alias-templates.cpp
+5-4clang/test/CXX/temp/temp.param/p1.cpp
+4-4clang/test/SemaTemplate/instantiation-depth-exception-spec.cpp
+4-4clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp
+4-4clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp
+4-4clang/test/CXX/temp/temp.spec/temp.expl.spec/p20.cpp
+4-4clang/test/SemaTemplate/instantiation-depth-defarg.cpp
+4-4clang/test/SemaTemplate/stack-exhaustion.cpp
+4-3clang/test/CXX/drs/cwg6xx.cpp
+4-3clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp
+5-2clang/test/SemaTemplate/temp_arg_type.cpp
+3-4clang/lib/Sema/SemaLambda.cpp
+7-0clang/test/Misc/integer-literal-printing.cpp
+3-4clang/lib/Sema/SemaInit.cpp
+4-3clang/test/CXX/expr/expr.const/p3-0x.cpp
+4-2clang/test/SemaCXX/type-trait-common-type.cpp
+4-2clang/test/SemaCXX/undefined-internal.cpp
+4-2clang/test/SemaCXX/lambda-expressions.cpp
+3-3clang/test/SemaTemplate/instantiation-depth.cpp
+3-2clang/test/CXX/temp/temp.deduct/p9.cpp
+4-1clang/test/SemaCXX/alias-template.cpp
+3-1clang/test/Modules/template-default-args.cpp
+2-2clang/lib/Sema/SemaTemplateDeduction.cpp
+2-2clang/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp
+2-2clang/test/CXX/temp/temp.spec/part.spec.cpp
+2-2clang/test/SemaCXX/constant-expression-cxx11.cpp
+2-2clang/test/SemaHLSL/BuiltIns/RWBuffers.hlsl
+2-2clang/test/SemaTemplate/instantiate-template-template-parm.cpp
+2-2clang/test/SemaTemplate/ms-unqualified-base-class.cpp
+2-2clang/test/SemaTemplate/nested-template.cpp
+2-1clang/test/SemaTemplate/instantiation-dependence.cpp
+3-0clang/test/CXX/drs/cwg3xx.cpp
+2-1clang/test/CXX/drs/cwg21xx.cpp
+2-1clang/test/SemaCXX/anonymous-struct.cpp
+2-1clang/test/SemaCXX/cxx98-compat-flags.cpp
+1-2clang/test/SemaTemplate/instantiation-default-2.cpp
+2-1clang/test/SemaTemplate/partial-spec-instantiate.cpp
+2-1clang/test/SemaTemplate/recovery-crash.cpp
+1-1clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp
+1-1clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp
+1-1clang/test/AST/ByteCode/cxx20.cpp
+1-1clang/test/AST/ByteCode/cxx1z.cpp
+1-1clang/test/SemaCXX/cxx2a-consteval.cpp
+1-1clang/test/SemaCXX/constant-expression.cpp
+1-1clang/test/SemaObjCXX/parameterized_classes_subst.mm
+1-1clang/test/Parser/MicrosoftExtensions.cpp
+1-1clang/test/CXX/temp/temp.res/temp.dep/temp.dep.constexpr/p2.cpp
+1-1clang/test/AST/ByteCode/cxx98.cpp
+1-1clang/test/CXX/temp/temp.param/p8-cxx20.cpp
+1-1clang/test/CXX/temp/temp.param/p12.cpp
+1-1clang/test/SemaTemplate/temp_arg_nontype_cxx11.cpp
+1-1clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-0x.cpp
+1-0clang/test/CXX/drs/cwg13xx.cpp
+1-0clang/test/SemaCXX/make_integer_seq.cpp
+1-0clang/test/CXX/drs/cwg10xx.cpp
+1-0clang/test/SemaCXX/cxx1z-noexcept-function-type.cpp
+1-0clang/test/SemaCXX/implicit-member-functions.cpp
+1-0clang/test/SemaCXX/warn-deprecated-specializations-in-system-headers.cpp
+1-0clang/test/Modules/missing-body-in-import.cpp
+1-0clang/test/CXX/basic/basic.lookup/basic.lookup.unqual/p7.cpp
+564-45395 files

UnifiedSplitRaw