================
@@ -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:
----------------
fursov wrote:
I ran the check-clang-python tests using clang 15 - it also does not resolve
the enum type to the integer types. But since there was no elaborated type yet,
it returns TypeKind.TYPEDEF instead (that matches the godbolt example from
above - the TUintType in clang15 - typedef, in clang16 - elaborated and only
then typedef).
The test like in patch above (test_enum_values_on_elaborated_type) fails same
way as on "main" branch:
```
self.assertEqual(ham.enum_value, 255)
AssertionError: -1 != 255
```
https://github.com/llvm/llvm-project/pull/108769
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits