[PATCH] D40234: [AutoComplete] Use stronger sort predicate for autocomplete candidates to remove non-deterministic ordering

Rui Ueyama via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 20 00:17:10 PST 2017


ruiu accepted this revision.
ruiu added a comment.

LGTM



================
Comment at: lib/Driver/Driver.cpp:1204
+                return X < 0;
+              return A.compare(B) > 0; });
 
----------------
I believe that if you use clang-format, `});` will be put to a separate line like this.

  std::sort(SuggestedCompletions.begin(), SuggestedCompletions.end(),
            [](StringRef A, StringRef B) {
              if (int X = A.compare_lower(B))
                return X < 0;
              return A.compare(B) > 0;
            });


https://reviews.llvm.org/D40234





More information about the cfe-commits mailing list