================
@@ -1550,6 +1550,8 @@ NamedDecl *Sema::ActOnNonTypeTemplateParameter(Scope *S,
Declarator &D,
IdResolver.AddDecl(Param);
}
+ ProcessDeclAttributes(S, Param, D);
----------------
AaronBallman wrote:
We definitely need some changes because we drop the attributes on the floor:
https://godbolt.org/z/oEr7bneaE
However, this is interesting:
https://eel.is/c++draft/temp#nt:template-parameter
https://eel.is/c++draft/dcl.fct#nt:parameter-declaration
So I would expect us to handle NTTPs the same as other parameter declarations.
But... are NTTP's a parameter? If so, our Attr.td and corresponding tablegen
might need some updates to distinguish between function parameters and
non-function parameters because of things like
https://eel.is/c++draft/dcl.attr.depend or
https://eel.is/c++draft/dcl.attr.indet because they're specific about function
parameters.
So I don't think this code is *wrong*, but I do think we may need to take
another look at how we process NTTPs because I would have expected them to use
the parameter declaration parsing code, which should automatically handle
processing attributes correctly.
https://github.com/llvm/llvm-project/pull/120327
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits