[PATCH] D142861: [Clang] avoid relying on StringMap iteration order when roundtripping -analyzer-config

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 30 09:57:28 PST 2023


MaskRay accepted this revision.
MaskRay added inline comments.


================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:886
+  llvm::sort(SortedConfigOpts, [](const auto &A, const auto &B) {
+    return std::get<0>(A) < std::get<0>(B);
+  });
----------------
If you use `pair` instead of `tuple`, you can use `llvm::less_first()`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142861



More information about the cfe-commits mailing list