[clang] [clang] Accept empty enum in MSVC compatible C (PR #159981)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 8 07:31:24 PDT 2025
https://github.com/AaronBallman commented:
Thank you for working on this!
I'd like to see extra test coverage to ensure that an empty enum has the same ABI properties in Clang as it does in MSVC. e.g., the size of the enumeration is still the same as the size of an int, an object of that type is still passed as an int (no masking or other oddities), etc. So I think perhaps we should add a CodeGen test just to smoke test the behavior.
We should probably also mention the extension somewhere in clang/docs/LanguageExtensions.rst. We currently have a section for `Enumerations with a fixed underlying type`, so we could add one nearby for `Enumerations with no enumerators` or something.
https://github.com/llvm/llvm-project/pull/159981
More information about the cfe-commits
mailing list