Hello, I’m trying to get myself acquainted with the clang frontend so I thought I would implement the already rejected syntax for compund requirements in C++.
{ foo(x) } → int;
I know it can be done with
{ foo(x) } → std::same_as;
But again, this is just to get myself acquainted.
I’ve seen that Parser::ParseRequiresExpression deals with this, and I’ve already recognized the case where there’s a type after the arrow → by using Parser::ParseTypeName. I just don’t know how to go forward because the Sema::ActOnCompoundRequirement does not expect a type.
Is it possible to generate an implicit concept like std::same_as and reuse the whole machinery of Sema::ActOnCompoundRequirement? Or should I add a whole new case and deal with it in concept definition and substitution? Any other approaches?
Thanks!