hokein added a comment. The code looks mostly good to me.
================ Comment at: clangd/ClangdLSPServer.cpp:789 +bool ClangdLSPServer::isSporadicCompletion( + const CompletionParams &Params) const { ---------------- The method name is a bit confusing to me, I didn't get its meaning at the first glance and without reading its comment. Maybe `shouldRunCompletion`? ================ Comment at: clangd/ClangdLSPServer.cpp:811 + if (Trigger == ">") + return (*Code)[*Offset - 2] != '-'; // trigger only on '->'. + if (Trigger == ":") ---------------- Checking `Offset` is not always right for rare cases like (`bar:/*commment*/:`), a robust way is to use lexer and get the token at the current position, but I don't think it is worth (these rare cases should not happen when people write code). Maybe add a comment documenting the limitation? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55994/new/ https://reviews.llvm.org/D55994 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits