[clang] [BPF] Return long from __builtin_preserve_enum_value() (PR #236261)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 27 16:48:44 PDT 2026
https://github.com/eddyz87 requested changes to this pull request.
```
enum foo : unsigned {
A, B
};
enum bar : signed {
C, D
};
```
Enum literals can be signed or unsigned, I think this pull request attempts to cover [this](https://github.com/llvm/llvm-project/pull/232498#discussion_r4363425147) example, but it does not seem a right way to do it. Instead, I suggest generating a proper type cast in #232498: `(enum-int-type)__builtin_preserve_enum_value(...)`.
https://github.com/llvm/llvm-project/pull/236261
More information about the cfe-commits
mailing list