[clang] 85d48b8 - [clang] treat deduced-as-dependent as undeduced for constant template parameters (#161099)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 28 23:46:10 PDT 2025
Author: Matheus Izvekov
Date: 2025-09-29T03:46:06-03:00
New Revision: 85d48b8fec371fe0979440abaf2d13718fba2ac3
URL: https://github.com/llvm/llvm-project/commit/85d48b8fec371fe0979440abaf2d13718fba2ac3
DIFF: https://github.com/llvm/llvm-project/commit/85d48b8fec371fe0979440abaf2d13718fba2ac3.diff
LOG: [clang] treat deduced-as-dependent as undeduced for constant template parameters (#161099)
The AutoType's deduced-as-dependent mechanism is not really used for
constant template parameters, but this is currently harmless to ignore
because when dealing which such types, they will have been transformed,
turning them back to plain undeduced AutoTypes.
This should be NFC for current main users, but
https://github.com/llvm/llvm-project/pull/141776 will depend on this.
Added:
Modified:
clang/lib/Sema/SemaTemplate.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index 3ebbb30ae483e..2bf1511c5cfa0 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -7102,7 +7102,7 @@ ExprResult Sema::CheckTemplateArgument(NamedDecl *Param, QualType ParamType,
// If the parameter type somehow involves auto, deduce the type now.
DeducedType *DeducedT = ParamType->getContainedDeducedType();
- bool IsDeduced = DeducedT && !DeducedT->isDeduced();
+ bool IsDeduced = DeducedT && DeducedT->getDeducedType().isNull();
if (IsDeduced) {
// When checking a deduced template argument, deduce from its type even if
// the type is dependent, in order to check the types of non-type template
More information about the cfe-commits
mailing list