[all-commits] [llvm/llvm-project] 381fca: [modules] Replace `-Wauto-import` with `-Rmodule-i...

Volodymyr Sapsai via All-commits all-commits at lists.llvm.org
Thu Jul 21 17:42:26 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 381fcaa1365b4fd8f9682a6a1e09f5b3fd4bbfc2
      https://github.com/llvm/llvm-project/commit/381fcaa1365b4fd8f9682a6a1e09f5b3fd4bbfc2
  Author: Volodymyr Sapsai <vsapsai at apple.com>
  Date:   2022-07-21 (Thu, 21 Jul 2022)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/include/clang/Basic/DiagnosticLexKinds.td
    M clang/lib/Lex/PPDirectives.cpp
    M clang/test/Modules/auto-module-import.m
    M clang/test/Modules/conflicts.m
    M clang/test/Modules/cxx20-include-translation.cpp
    M clang/test/Modules/framework-name.m
    M clang/test/Modules/global_index.m
    M clang/test/Modules/implementation-of-module.m
    M clang/test/Modules/inferred-frameworks.m
    M clang/test/Modules/inferred-submodules.m
    M clang/test/Modules/requires.m
    M clang/test/Modules/requires.mm
    M clang/test/Modules/resolution-change.m
    M clang/test/Modules/subframeworks.m
    M clang/test/Modules/submodules.m
    M clang/test/VFS/real-path-found-first.m

  Log Message:
  -----------
  [modules] Replace `-Wauto-import` with `-Rmodule-include-translation`.

Diagnostic for `-Wauto-import` shouldn't be a warning because it doesn't
represent a potential problem in code that should be fixed. And the
emitted fix-it is likely to trigger `-Watimport-in-framework-header`
which makes it challenging to have a warning-free codebase. But it is
still useful to see how include directives are translated into modular
imports and which module a header belongs to, that's why keep it as a remark.

Keep `-Wauto-import` for now to allow a gradual migration for codebases
using `-Wno-auto-import`, e.g., `-Weverything -Wno-auto-import`.

rdar://79594287

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




More information about the All-commits mailing list