[clang] [libclang/python] Fix evaluation of the unsigned enumeration values, #108766 (PR #108769)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 23 13:18:01 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:

Apologies for the delayed answer, I'm on vacation at the moment.

I asked Corentin and Erich offline, they agreed that having an `ElaboratedType` node here is surprising, because elaborated type specifiers are not involved. Would it be the correct assessment that this is the core part of your PR? If so, I'd like to hold this off, and resolve an underlying issue instead. You don't have to do it yourself if you don't feel like it. I might get it to it myself later.

Does this sound good to you?

https://github.com/llvm/llvm-project/pull/108769


More information about the cfe-commits mailing list