[clang] [Clang] Implement CWG2900 (PR #224291)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 12 01:48:37 PDT 2026
================
@@ -234,31 +234,39 @@ class NonTypeOrVarTemplateParmDecl {
const NamedDecl *Template;
};
-/// If the given expression is of a form that permits the deduction
-/// of a non-type template parameter, return the declaration of that
-/// non-type template parameter.
+/// If the given expression is of a form that names a non-type template
+/// parameter, return the declaration of that parameter. A null \p Depth
+/// accepts a parameter at any depth.
static NonTypeOrVarTemplateParmDecl
-getDeducedNTTParameterFromExpr(const Expr *E, unsigned Depth) {
+getNTTParameterFromExpr(const Expr *E, UnsignedOrNone Depth) {
----------------
zyn0217 wrote:
There's only 1 client of getTypeOfConstantTemplateParameter, so maybe we want to promote this function rather than a new function in Sema?
https://github.com/llvm/llvm-project/pull/224291
More information about the cfe-commits
mailing list