rwols marked 7 inline comments as done. rwols added inline comments.
================ Comment at: clangd/ClangdUnit.cpp:376 + + CompletionItem Item{InsertTextFormat::PlainText}; + ---------------- ilya-biryukov wrote: > Implementations of this function in `PlainTextCompletionItemsCollector` and > `SnippetCompletionItemsCollector` are the same. > Maybe make `ProcessChunks` virtual instead? > > Or maybe consider replacing inheritance with a `bool` flag. Inheritance does > not seem to buy us much here. This looks simpler: > ``` > if (EnableSnippets) > ProcessChunksWithSnippets(CCS, Item); > else > ProcessChunksWithoutSnippets(CCS, Item); > > ``` > > I went with the "make ProcessChunks virtual" approach, wouldn't your suggestion have an impact on performance? There'd be a check for every completion item now. https://reviews.llvm.org/D37101 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits