================
@@ -257,9 +257,10 @@ getNTTParameterFromExpr(const Expr *E, UnsignedOrNone
Depth) {
}
QualType Sema::getTypeOfConstantTemplateParameter(const TemplateArgument &Arg)
{
- if (NonTypeOrVarTemplateParmDecl NTTP =
- getNTTParameterFromExpr(Arg.getAsExpr(), std::nullopt))
- return NTTP.getType();
+ if (Arg.getKind() == TemplateArgument::Expression)
----------------
cor3ntin wrote:
Ugh, actually we should have used getNonTypeTemplateArgumentType() in the non
expression case...
I.E, in the expression case we want tohandle declrefs, etc, but in all other
cases, we still want the type of the NTTP
@EmmanuelAC1
https://github.com/llvm/llvm-project/pull/231599
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits