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

Jannick Kremer via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 18 03:37:06 PDT 2024


================
@@ -570,6 +570,26 @@ def test_enum_values_cpp(self):
         self.assertEqual(ham.kind, CursorKind.ENUM_CONSTANT_DECL)
         self.assertEqual(ham.enum_value, 0x10000000000)
 
+    def test_enum_values_on_elaborated_type(self):
+        tu = get_tu(
+            "using myUType = unsigned char; enum TEST : myUType { SPAM = 1, HAM = 0xff; }",
----------------
DeinAlptraum wrote:

The semicolon goes outside the curly braces ;)
```suggestion
            "using myUType = unsigned char; enum TEST : myUType { SPAM = 1, HAM = 0xff };",
```

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


More information about the cfe-commits mailing list