[PATCH] D34137: [clangd] Add priority to completion item sort text

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 14 02:46:45 PDT 2017


ilya-biryukov added inline comments.


================
Comment at: clangd/ClangdUnit.cpp:156
         assert(CCS->getTypedText());
+        CCS->getPriority();
         Item.kind = getKind(Result.CursorKind);
----------------
This is a no-op, commited incidentally?


================
Comment at: clangd/ClangdUnit.cpp:163
+        // is 99964a.
+        llvm::raw_string_ostream(Item.sortText) << llvm::format(
+            "%05d%s", 99999 - CCS->getPriority(), CCS->getTypedText());
----------------
Maybe add an assert(CCS.getPriority() < 99999)?


https://reviews.llvm.org/D34137





More information about the cfe-commits mailing list