kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land.
================ Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:524 const auto *Tok = TB.spelledTokenAt(Loc); - assert(Tok); - + if (!Tok) + return std::nullopt; ---------------- can you add a comment here "We might have offsets in the main file that don't correspond to any spelled tokens." i think we should fix that in token buffer spelled token mappings going forward. we're relying on other places around `spelledTokenAt` returning a valid Token whenever we pass it a main file source location. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143486/new/ https://reviews.llvm.org/D143486 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits