[clang] [clang] Introduce `SemaCoroutine` (PR #92645)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Sun May 19 22:11:01 PDT 2024


Endilll wrote:

> While I am not against the idea about splitting Sema, the implementation detail makes me slightly concerning. What I had in mind is to split SemaC, SemaCXX (this can be derived class of SemaCXX), SemaObjC and other dialects (e.g., ACC or CUDA) out of Sema.

Inheritance is problematic, because it can't work off forward declarations of base classes. I believe there is still hope that we can reduce the blast radius of header changes in terms of TUs being recompiled.

Also note that language dialects you have in mind have already been moved outside of `Sema`.

> Then big features of C++ can be member of SemaCXX as SemaCoroutine, SemaConcept...

This would mean even more hierarchy than just `Sema` containing a flat list of references to its parts. I'm not particularly opposed to it, but it's not on my radar at the moment. It would impact usage side, e.g. `Actions.CXX().Coroutine().ActOnCoawaitExpr()`, and I can see why people would be opposed to it.

https://github.com/llvm/llvm-project/pull/92645


More information about the cfe-commits mailing list