[Lldb-commits] [lldb] [lldb] Print empty enums as if they were unrecognised normal enums (PR #97553)

Martin Storsjö via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 3 13:45:47 PDT 2024


mstorsjo wrote:

This causes build errors with GCC (11):
```
../../lldb/unittests/ValueObject/DumpValueObjectOptionsTests.cpp: In member function ‘virtual void ValueObjectMockProcessTest_EmptyEnum_Test::TestBody()’:
../../lldb/unittests/ValueObject/DumpValueObjectOptionsTests.cpp:134:22: error: narrowing conversion of ‘-2’ from ‘int’ to ‘unsigned int’ [-Wnarrowing]
  134 |   TestDumpValueObject(MakeEnumType({}, true),
      |   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
  135 |                       {{-2, {}, "(TestEnum) test_var = -2\n"},
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  136 |                        {-1, {}, "(TestEnum) test_var = -1\n"},
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  137 |                        {0, {}, "(TestEnum) test_var = 0\n"},
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  138 |                        {1, {}, "(TestEnum) test_var = 1\n"},
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  139 |                        {2, {}, "(TestEnum) test_var = 2\n"}});

```

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


More information about the lldb-commits mailing list