[all-commits] [llvm/llvm-project] c47237: [clangd] IncludeCleaner: Don't warn on system headers

Kirill Bobyrev via All-commits all-commits at lists.llvm.org
Wed Oct 27 02:51:31 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c4723785c1902d6a53f3808fa1dabb2a97c1cc6e
      https://github.com/llvm/llvm-project/commit/c4723785c1902d6a53f3808fa1dabb2a97c1cc6e
  Author: Kirill Bobyrev <kbobyrev at google.com>
  Date:   2021-10-27 (Wed, 27 Oct 2021)

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

  Log Message:
  -----------
  [clangd] IncludeCleaner: Don't warn on system headers

This is a temporary hack to disable diagnostics for system headers. As of right
now, IncludeCleaner does not handle the Standard Library correctly and will
report most system headers as unused because very few symbols are defined in
top-level system headers. This will eventually be fixed, but for now we are
aiming for the most conservative approach with as little false-positive
warnings as possible. After the initial prototype and core functionality is
polished, I will turn back to handling the Standard Library as it requires
custom logic.

Reviewed By: sammccall

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




More information about the All-commits mailing list