[Lldb-commits] [PATCH] D67520: Add pretty printing of Clang "bitfield" enums

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 12 14:21:48 PDT 2019


jingham added a comment.

Also, since in C++ you can't do:

enum bitfield ac = A | C;

it's fairly common practice to pass or'ed elements from the enum as an int of some sort.

This feature would be really handy in that case, but the way you would get at it is not through frame var (since you can't actually have a variable of bitfield type that has more than one value) but by casting in the expression parser:

int whatever = A | B

And then to reveal this, you would want to do:

(lldb) expr (enum bitfield) whatever

Be nice to see a test of that to make sure that works through the expression parser as well.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67520/new/

https://reviews.llvm.org/D67520





More information about the lldb-commits mailing list