HomePhabricator

[clangd] Fix filename ranges while replaying preamble

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

Description

[clangd] Fix filename ranges while replaying preamble

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.

Differential Revision: https://reviews.llvm.org/D112559

Details