[PATCH] D63821: [clangd] Added C++ API code for semantic highlighting
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 27 06:20:01 PDT 2019
hokein added inline comments.
================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.h:60
+ void
+ onHighlightingsReady(PathRef File,
+ std::vector<HighlightingToken> Highlightings) override;
----------------
jvikstrom wrote:
> hokein wrote:
> > nit: you can remove this override, since we have provided an empty default implementation.
> I get an `-Winconsistent-missing-override` warnings without the override.
sorry for the confusion, I meant we remove `onHighlightingsReady`, not the `override` keyword.
================
Comment at: clang-tools-extra/clangd/unittests/ClangdTests.cpp:864
+ ClangdServer Server(MCD, FS, DiagConsumer, ClangdServer::optsForTest());
+ Server.addDocument(FooCpp, "int a;");
+ ASSERT_EQ(DiagConsumer.Count, 1);
----------------
this is not safe, we need to wait until the server finishes building AST.
add `ASSERT_TRUE(Server.blockUntilIdleForTest()) << "Waiting for server"; `
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63821/new/
https://reviews.llvm.org/D63821
More information about the cfe-commits
mailing list