[all-commits] [llvm/llvm-project] 33f35a: [clang-tidy] Fix `TransformerClangTidyCheck`'s han...

Yitzhak Mandelbaum via All-commits all-commits at lists.llvm.org
Fri Feb 12 08:24:56 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 33f35a4b793bb53b830f8893110af57672e1dc79
      https://github.com/llvm/llvm-project/commit/33f35a4b793bb53b830f8893110af57672e1dc79
  Author: Yitzhak Mandelbaum <yitzhakm at google.com>
  Date:   2021-02-12 (Fri, 12 Feb 2021)

  Changed paths:
    M clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp

  Log Message:
  -----------
  [clang-tidy] Fix `TransformerClangTidyCheck`'s handling of include insertions.

Currently, all include insertions are directed to the main file. However,
Transformer rules can specify alternative destinations for include
insertions. This patch fixes the code to associate the include with the correct
file.

This patch was tested manually. The clang tidy unit test framework does not
support testing changes to header files. Given that this is a bug fix for a live
bug, the patch relies on manual testing rather than blocking on upgrading the
unit test framework.

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




More information about the All-commits mailing list