This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Fix filename ranges while replaying preamble
ClosedPublic

Authored by kadircet on Oct 26 2021, 10:12 AM.

Details

Summary

Clangd used first token of filename as filename range rather than the
synthezied filename token. Unfortunately the former only contains " or < in
the raw lexing mode, resulting in wrong range information and breaking tidy
checks that relied on it.

Fixes https://github.com/clangd/clangd/issues/896.

Diff Detail

Event Timeline

kadircet created this revision.Oct 26 2021, 10:12 AM
kadircet requested review of this revision.Oct 26 2021, 10:12 AM
sammccall accepted this revision.Oct 26 2021, 10:22 AM

Wow, nice find!

This revision is now accepted and ready to land.Oct 26 2021, 10:22 AM
This revision was automatically updated to reflect the committed changes.