aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2026-02-25 18:06:51 +0000
committerDimitry Andric <dim@FreeBSD.org>2026-04-25 14:14:22 +0000
commit5ac874516b27474ab5b3d195544c72fb04b4b86e (patch)
treeb2681da6c5d009b32805791e4d1dfc978bb5ed7a
parent0f15398d123a9cf02711efddf5e4040f0066c6de (diff)
Merge commit 787ba2426148 from llvm git (by Matheus Izvekov):
[clang] create local instantiation scope for matching template template parameters (#183219) This fixes a bug where a partial substitution from the enclosing scope is used to prepopulate an unrelated template argument deduction. Fixes #181166 This fixes an expected error when building the devel/catch port. PR: 292067 MFC after: 1 month
-rw-r--r--contrib/llvm-project/clang/lib/Sema/SemaTemplateDeduction.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/llvm-project/clang/lib/Sema/SemaTemplateDeduction.cpp b/contrib/llvm-project/clang/lib/Sema/SemaTemplateDeduction.cpp
index ce78ecc2d4a2..d1fb0c45c81f 100644
--- a/contrib/llvm-project/clang/lib/Sema/SemaTemplateDeduction.cpp
+++ b/contrib/llvm-project/clang/lib/Sema/SemaTemplateDeduction.cpp
@@ -6478,6 +6478,8 @@ bool Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(
if (Inst.isInvalid())
return false;
+ LocalInstantiationScope Scope(*this);
+
// Given an invented class template X with the template parameter list of
// A (including default arguments):
// - Each function template has a single function parameter whose type is