sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clangd/CodeComplete.cpp:396
+    // Prefer includes that do not need edits (i.e. already exist).
+    std::stable_sort(Completion.Includes.begin(), Completion.Includes.end(),
+                     [](const CodeCompletion::IncludeCandidate &LHS,
----------------
nit: this could be std::stable_partition. Not sure if faster, but maybe clearer.


================
Comment at: clangd/CodeComplete.h:145
+  // All possible include headers ranked by preference. By default, the first
+  // include is used.
+  llvm::SmallVector<IncludeCandidate, 1> Includes;
----------------
if we've bundled together overloads that have different sets of providing 
headers, these includes may not be accurate for all of them. Maybe comment this 
limitation?


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51291



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to