[PATCH] D52800: Java import sorting in clang-format

Mandeep Singh Grang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 2 15:43:42 PDT 2018


mgrang added inline comments.


================
Comment at: lib/Format/Format.cpp:1856
+  }
+  std::sort(Indices.begin(), Indices.end(), [&](unsigned LHSI, unsigned RHSI) {
+        // Negating IsStatic to push static imports above non-static imports.
----------------
Please use llvm::sort instead of std::sort. See https://llvm.org/docs/CodingStandards.html#beware-of-non-deterministic-sorting-order-of-equal-elements.


https://reviews.llvm.org/D52800





More information about the cfe-commits mailing list