[Lldb-commits] [PATCH] D133240: [Formatters][NFCI] Replace 'is_regex' arguments with an enum.

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 13 07:49:31 PDT 2022


labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

This seems in line with what was being discussed. Jim, do you have any thoughts on this?



================
Comment at: lldb/include/lldb/lldb-enumerations.h:841
+
+  kNumFormatterMatchTypes,
+};
----------------
I see the enums in this file use wildly inconsistent styles for the "largest value" enumerator. However, you've picked the one I like the least, because this tends to produce `unhandled switch case "kNumFormatterMatchTypes"` warnings. If you feel like you need to have a sentinel, I'd recommend going with the `eLastFormatterMatchType = <last enum value>` pattern (used e.g. in the StateType enum).


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

https://reviews.llvm.org/D133240



More information about the lldb-commits mailing list