[all-commits] [llvm/llvm-project] 144562: [clangd] Treat preamble patch as main file for inc...

kadir ├žetinkaya via All-commits all-commits at lists.llvm.org
Wed Apr 12 12:06:22 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 144562e678d932dc2685f8a83aeb2229bc96d71a
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2023-04-12 (Wed, 12 Apr 2023)

  Changed paths:
    M clang-tools-extra/clangd/IncludeCleaner.cpp
    M clang-tools-extra/clangd/Preamble.cpp
    M clang-tools-extra/clangd/Preamble.h
    M clang-tools-extra/clangd/unittests/PreambleTests.cpp

  Log Message:
  [clangd] Treat preamble patch as main file for include-cleaner analysis

Since we redefine all macros in preamble-patch, and it's parsed after
consuming the preamble macros, we can get false missing-include diagnostics
while a fresh preamble is being rebuilt.

This patch makes sure preamble-patch is treated same as main file for
include-cleaner purposes.

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

More information about the All-commits mailing list