Issue 120759
Summary Add support for `/Zc:enumTypes` compiler flag in MSVC mode
Labels new issue
Assignees
Reporter Saalvage
    MSVC used to have a [bug](https://developercommunity.visualstudio.com/t/underlying-type-of-an-unscoped-enum/524018) where enums always had the implicit underlying type of `int` , independently of the enum's items. This bug is [accomodated for](https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaDecl.cpp#L17268-L17275) within clang's MSVC compatibility mode, while the fix for it (the `/Zc:enumTypes` flag) is not.

The issue with this is that this results in information being lost for the enum's items (as they are trimmed to fit the underlying type), so fixing this on the application side would likely require reparsing the items.

I believe this might potentially be a good fit for an option in `LangOptions.def`?
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to