[all-commits] [llvm/llvm-project] 7f3d2c: [include-cleaner] Fix the `fixIncludes` API not re...

Haojian Wu via All-commits all-commits at lists.llvm.org
Tue Jul 11 06:02:43 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7f3d2cd7ec254cda659c5e5a19a42105e370e04c
      https://github.com/llvm/llvm-project/commit/7f3d2cd7ec254cda659c5e5a19a42105e370e04c
  Author: Haojian Wu <hokein.wu at gmail.com>
  Date:   2023-07-11 (Tue, 11 Jul 2023)

  Changed paths:
    M clang-tools-extra/include-cleaner/include/clang-include-cleaner/Analysis.h
    M clang-tools-extra/include-cleaner/lib/Analysis.cpp
    M clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp
    M clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp

  Log Message:
  -----------
  [include-cleaner] Fix the `fixIncludes` API not respect main-file header.

The fixIncludes was using the `input` as the main file path, this will
results in inserting header at wrong places.

We need the main file path to so that we can get the real main-file
header.

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




More information about the All-commits mailing list