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

Fangrui Song via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 16 00:28:53 PDT 2019


MaskRay added inline comments.


================
Comment at: source/Symbol/ClangASTContext.cpp:9529
+  // in `enum {A, B, ALL = A|B }` we visit ALL first.
+  std::stable_sort(
+      values.begin(), values.end(), [](const auto &a, const auto &b) {
----------------
You can simply sort by magnitude and iterating the elements from the largest to the smallest.


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

https://reviews.llvm.org/D67520





More information about the lldb-commits mailing list