This revision was automatically updated to reflect the committed changes.
Closed by commit rL321083: [clangd] Index-based code completion. (authored by
ioeric, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D41281
Files:
clang-tools-extra/trunk/clangd/CodeComplete.cpp
clang-
ioeric added inline comments.
Comment at: clangd/CodeComplete.h:64
+
+ // Populated internally by clangd, do not set.
+ /// If `Index` is set, it is used to augment the code completion
ilya-biryukov wrote:
> sammccall wrote:
> > ilya-biryukov wrote:
> > > ioeri
ioeric updated this revision to Diff 127538.
ioeric added a comment.
- Add a FIXME for Index in code completion options.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D41281
Files:
clangd/CodeComplete.cpp
clangd/CodeComplete.h
clangd/index/FileIndex.cpp
clangd/index/Fil
ioeric updated this revision to Diff 127536.
ioeric marked an inline comment as done.
ioeric added a comment.
- Move implementations around to make code easier to read.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D41281
Files:
clangd/CodeComplete.cpp
clangd/CodeComplete.h
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
LGTM. I still think that we should move the `SymbolIndex` out of the struct,
but don't want to block this patch.
Comment at: clangd/CodeComplete.h:64
+
+ // Populated internally by clangd, do not set.
+ ///
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
Comment at: clangd/CodeComplete.cpp:111
+ case SK::Using:
+return CompletionItemKind::Reference;
+ case SK::Function:
ioeric wrote:
> sammcca
ilya-biryukov added inline comments.
Comment at: clangd/CodeComplete.cpp:334
+ Item.insertTextFormat = InsertTextFormat::PlainText;
+ // FIXME: sort symbols appropriately.
+ Item.sortText = "";
ioeric wrote:
> ilya-biryukov wrote:
> > NIT: FIXME(ioeric)?
> > A
ioeric updated this revision to Diff 127509.
ioeric added a comment.
- Fixed a bug when completing scope that starts with '::'.
- Diff base on origin/master
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D41281
Files:
clangd/CodeComplete.cpp
clangd/CodeComplete.h
clangd/in
ioeric updated this revision to Diff 127488.
ioeric added a comment.
- Merged with origin/master
- Merged with https://reviews.llvm.org/D41351
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D41281
Files:
clangd/CodeComplete.cpp
clangd/CodeComplete.h
clangd/index/FileIndex.
ioeric added a comment.
Thanks for the review!
Comment at: clangd/CodeComplete.cpp:847
+ if (Opts.Index && SCInfo.SSInfo) {
+// FIXME: log warning with logger if sema code completion have collected
+// results.
ilya-biryukov wrote:
> NIT: FIXME(ioeric)
ioeric updated this revision to Diff 127406.
ioeric marked 21 inline comments as done.
ioeric added a comment.
- Address comments in CodeComplete.cpp
- Split index changes into a separate patch.
- Merged with patch https://reviews.llvm.org/D41351.
- Remove Position.* files.
Repository:
rCTE Cl
ilya-biryukov added a comment.
Here are a few more comments.
Comment at: clangd/CodeComplete.cpp:847
+ if (Opts.Index && SCInfo.SSInfo) {
+// FIXME: log warning with logger if sema code completion have collected
+// results.
NIT: FIXME(ioeric)?
Also,
sammccall added a comment.
Hope you don't mind me piling on... let me know!
Mostly readability, but i'd also like to reduce the scope w.r.t namespace
completion.
Comment at: clangd/CodeComplete.cpp:90
+CompletionItemKind getKindOfSymbol(index::SymbolKind Kind) {
+ using SK
sammccall added a comment.
A few drive-by comments, will look deeper if I have time but don't wait for me.
Comment at: clangd/Position.cpp:34
+ int Lines = JustBefore.count('\n');
+ int Cols = JustBefore.size() - JustBefore.rfind('\n') - 1;
+ return {Lines, Cols};
--
ioeric updated this revision to Diff 127118.
ioeric added a comment.
- Merge remote-tracking branch 'origin/master' into index-completion
- Fix merge with origin/master.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D41281
Files:
clangd/CMakeLists.txt
clangd/ClangdLSPServer
ioeric created this revision.
ioeric added a reviewer: ilya-biryukov.
Herald added subscribers: cfe-commits, mgorny, klimek.
Use symbol index to populate completion results for qualfified IDs e.g.
"nx::A^".
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D41281
Files:
clangd/C
16 matches
Mail list logo