[all-commits] [llvm/llvm-project] 2f1ef1: [Clang] Add new -header-include-filtering=direct-p...

Bob Wilson via All-commits all-commits at lists.llvm.org
Mon Apr 28 21:55:10 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2f1ef1d18334629bf7c6be1951092f3974b40f0e
      https://github.com/llvm/llvm-project/commit/2f1ef1d18334629bf7c6be1951092f3974b40f0e
  Author: Bob Wilson <bob.wilson at apple.com>
  Date:   2025-04-28 (Mon, 28 Apr 2025)

  Changed paths:
    M clang/include/clang/Basic/HeaderInclude.h
    M clang/include/clang/Driver/Options.td
    M clang/lib/Frontend/HeaderIncludeGen.cpp
    M clang/test/Preprocessor/print-header-json.c
    M clang/tools/driver/driver.cpp

  Log Message:
  -----------
  [Clang] Add new -header-include-filtering=direct-per-file option (#137087)

This adds a new filtering option to be used along with the
-header-include-format=json option. The existing "only-direct-system"
filtering option is missing some things:
- It does not show module imports.
- It does not show includes of non-system headers. This new
"direct-per-file" filtering has a separate entry in the JSON output for
each non-system source file, showing the direct includes and imports
from that file. You can use this to see uses of non-system headers, and
also find the paths through non-system headers that lead up to module
imports and system headers. Modules are identified here by their
modulemap files.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list