Commit 3101524
authored
[lldb] Print "0x0" for bitfield like enums where the value is 0 (#97557)
Enums like this one are treated as bitfield like enums: enum FlagsLike
{B=2, C=4};
lldb recognises them as collections of flags, so you can have "B | C".
If there's any values not covered that's printed as hex "B | C | 0x1".
What happened if the value was 0 was we would not match any of the
enumerators, then the remainder check requires that the remainder is
non-zero. So lldb would print nothing at all.
Which I assume is a bug because knowing that no flags are set is useful,
just as much as knowing that some unkown bit was set to make it
non-zero.1 parent 41fddc4 commit 3101524
File tree
2 files changed
+12
-4
lines changed- lldb
- source/Plugins/TypeSystem/Clang
- unittests/ValueObject
2 files changed
+12
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8693 | 8693 | | |
8694 | 8694 | | |
8695 | 8695 | | |
| 8696 | + | |
| 8697 | + | |
| 8698 | + | |
| 8699 | + | |
| 8700 | + | |
| 8701 | + | |
| 8702 | + | |
8696 | 8703 | | |
8697 | 8704 | | |
8698 | 8705 | | |
| |||
8717 | 8724 | | |
8718 | 8725 | | |
8719 | 8726 | | |
8720 | | - | |
| 8727 | + | |
| 8728 | + | |
8721 | 8729 | | |
8722 | 8730 | | |
8723 | 8731 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | | - | |
| 168 | + | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
0 commit comments