[all-commits] [llvm/llvm-project] ba6e74: [clang] Set ShowInSystemHeader for module-build an...

Dave Lee via All-commits all-commits at lists.llvm.org
Fri Mar 31 15:56:23 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ba6e747f9b05e541e88822e1dbd6bd5424cfe2fb
  Author: Dave Lee <davelee.com at gmail.com>
  Date:   2023-03-31 (Fri, 31 Mar 2023)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticFrontendKinds.td
    M clang/include/clang/Basic/DiagnosticSerializationKinds.td
    A clang/test/Modules/system-Rmodule-build.m

  Log Message:
  [clang] Set ShowInSystemHeader for module-build and module-import remarks

Without this change, the use of `-Rmodule-build` and `-Rmodule-import` only
produces diagnostics for modules built or imported by non-system code.

For example, if a project source file requires the Foundation module to be
built, then `-Rmodule-build` will show a single diagnostic for Foundation, but
not in turn for any of Foundation's (direct or indirect) dependencies. This is
because the locations of those transitive module builds are initiated from
system headers, which are ignored by default. When wanting to observe module
building/importing, the system modules can represent a significant amount of
module diagnostics, and I think should be shown by default when
`-Rmodule-build` and `-Rmodule-import` are specified.

I noticed some other remarks use `ShowInSystemHeader`.

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

More information about the All-commits mailing list