[modules] Replace `-Wauto-import` with `-Rmodule-include-translation`.
authorVolodymyr Sapsai <vsapsai@apple.com>
Tue, 19 Jul 2022 21:27:02 +0000 (14:27 -0700)
committerVolodymyr Sapsai <vsapsai@apple.com>
Fri, 22 Jul 2022 00:42:04 +0000 (17:42 -0700)
commit381fcaa1365b4fd8f9682a6a1e09f5b3fd4bbfc2
tree5e13e6c45ef3460bb881a15b356d1af19fb85788
parent98186def3f1f6f3862e6c91ca01dfd278ad1929e
[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
17 files changed:
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticLexKinds.td
clang/lib/Lex/PPDirectives.cpp
clang/test/Modules/auto-module-import.m
clang/test/Modules/conflicts.m
clang/test/Modules/cxx20-include-translation.cpp
clang/test/Modules/framework-name.m
clang/test/Modules/global_index.m
clang/test/Modules/implementation-of-module.m
clang/test/Modules/inferred-frameworks.m
clang/test/Modules/inferred-submodules.m
clang/test/Modules/requires.m
clang/test/Modules/requires.mm
clang/test/Modules/resolution-change.m
clang/test/Modules/subframeworks.m
clang/test/Modules/submodules.m
clang/test/VFS/real-path-found-first.m