[all-commits] [llvm/llvm-project] e42f5d: [clangd] Fix filename ranges while replaying preamble

kadir çetinkaya via All-commits all-commits at lists.llvm.org
Wed Oct 27 00:39:30 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e42f5d4b488e78ebf5b756e1e76422c7458ba81c
      https://github.com/llvm/llvm-project/commit/e42f5d4b488e78ebf5b756e1e76422c7458ba81c
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2021-10-27 (Wed, 27 Oct 2021)

  Changed paths:
    M clang-tools-extra/clangd/ParsedAST.cpp
    M clang-tools-extra/clangd/unittests/ParsedASTTests.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list