hokein added inline comments.
================ Comment at: clang-tools-extra/clangd/SemanticHighlight.cpp:43 + + unsigned int Len = + clang::Lexer::MeasureTokenLength(D->getLocation(), SM, Ctx.getLangOpts()); ---------------- we can reuse the getTokenRange() function (in SourceCode.h), you need to sync your branch to master. ================ Comment at: clang-tools-extra/clangd/SemanticHighlight.cpp:46 + + if (D->getLocation().isMacroID()) { + // FIXME; This is inside a macro. For now skip the token ---------------- I'd move this line at the beginning of the method. ================ Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightTests.cpp:57 + + checkTokensExists(Tokens, Variables, SemanticHighlightKind::Variable); + checkTokensExists(Tokens, Function, SemanticHighlightKind::Function); ---------------- ``` checkHighlights(R"cpp(void $Function[[Foo]]))cpp"); checkHighlights(...) { ... ExpectedTokens = annotation.ranges(toString(SemanticHighlightKind::Variable)); ExpectedTokens = annotation.ranges(toString(SemanticHighlightKind::Function)); EXPECT_THAT(ExpectedTokens, UnorderedElementsAreArray(ActualTokens)); } Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63559/new/ https://reviews.llvm.org/D63559 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits