[clang] [libclang/python] Fix evaluation of the unsigned enumeration values, #108766 (PR #108769)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 20 12:44:57 PDT 2024
================
@@ -1952,6 +1952,8 @@ def enum_value(self):
underlying_type = self.type
if underlying_type.kind == TypeKind.ENUM:
underlying_type = underlying_type.get_declaration().enum_type
+ if underlying_type.kind == TypeKind.ELABORATED:
----------------
Endilll wrote:
Per http://eel.is/c++draft/dcl.enum#2.sentence-4, underlying type of an enum has to be an integral type, even if grammar allows an elaborated type specifier there. I'm not sure `TypeKind.ELABORATED` can ever be a correct answer for an underlying type of an enumeration. Could it be that we're looking at a deeper issue here?
CC @AaronBallman @cor3ntin
https://github.com/llvm/llvm-project/pull/108769
More information about the cfe-commits
mailing list