hokein added inline comments.
================ Comment at: clang-tools-extra/clangd/ClangdServer.cpp:119 if (CollectInactiveRegions) { - ServerCallbacks->onInactiveRegionsReady( - Path, std::move(AST.getMacros().SkippedRanges)); + std::vector<Range> SkippedRanges( + std::move(AST.getMacros().SkippedRanges)); ---------------- this part of code becomes non-trivial now, I suggest pulling out a function and moving it to `SemanticHighlighting.cpp`. The old inactive-as-comment implementation can share it as well. ================ Comment at: clang-tools-extra/clangd/ClangdServer.cpp:153 + } + ServerCallbacks->onInactiveRegionsReady(Path, InactiveRegions); } ---------------- nit: std::move(InactiveRegions). ================ Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:478 for (int Line = R.start.line; Line <= R.end.line; ++Line) { // If the end of the inactive range is at the beginning // of a line, that line is not inactive. ---------------- I think we should do the same thing for the old implementation as well (or just delete it at all), otherwise, we will have inconsistent behavior. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151190/new/ https://reviews.llvm.org/D151190 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits