[all-commits] [llvm/llvm-project] 50f4f3: [clangd] Retain main file fixes attached to diags ...

kadir çetinkaya via All-commits all-commits at lists.llvm.org
Thu Mar 24 07:20:01 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 50f4f32b56688d8cdeff5cda0982f19863093cd5
      https://github.com/llvm/llvm-project/commit/50f4f32b56688d8cdeff5cda0982f19863093cd5
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2022-03-24 (Thu, 24 Mar 2022)

  Changed paths:
    M clang-tools-extra/clangd/Diagnostics.cpp
    M clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp

  Log Message:
  -----------
  [clangd] Retain main file fixes attached to diags from preamble

Clangd ignores fixits if the diagnsotics is outside the main file (e.g.
a note on a declaration from a header), but the fix might still be inside the
main file (e.g. change the function call).

This patch changes the logic to retain fixes that touch main file, if the
diagnostic owning them is still inside main file, even if they are attached to a
note outside the main file.

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




More information about the All-commits mailing list