This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Run semantic highligting in clangd check.
ClosedPublic

Authored by hokein on Oct 31 2022, 2:06 AM.

Details

Summary

Allowing us to test this feature (context: a recent crash in
semantic highlighting.)

Diff Detail

Event Timeline

hokein created this revision.Oct 31 2022, 2:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 31 2022, 2:06 AM
Herald added a subscriber: arphaman. · View Herald Transcript
hokein requested review of this revision.Oct 31 2022, 2:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 31 2022, 2:06 AM
kadircet added inline comments.Oct 31 2022, 3:31 AM
clang-tools-extra/clangd/tool/Check.cpp
212

can you also vlog the highlights, while limitting the output to ranges that intersect with the LineRange passed to check, when present.

hokein updated this revision to Diff 471951.Oct 31 2022, 3:48 AM
hokein marked an inline comment as done.

add line-range support

kadircet accepted this revision.Oct 31 2022, 4:07 AM

thanks!

clang-tools-extra/clangd/tool/Check.cpp
213

we should print all the highlights when LineRange is missing. so maybe turn this into:

auto Highlights = ...
for(const auto HL : ..) {
  if(!LineRange || LineRange->contains(HL.R))
     vlog(...);
}
This revision is now accepted and ready to land.Oct 31 2022, 4:07 AM
hokein marked an inline comment as done.Oct 31 2022, 6:47 AM
hokein added inline comments.
clang-tools-extra/clangd/tool/Check.cpp
213

I was going to say this likely introduces too much noise to the output log, then I realized that we already did it for inlay hints, probably it is fine for verbose log...

This revision was automatically updated to reflect the committed changes.
hokein marked an inline comment as done.