[PATCH] D130138: [modules] Replace `-Wauto-import` with `-Rmodule-include-translation`.

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 19 19:00:27 PDT 2022


vsapsai created this revision.
vsapsai added reviewers: iains, rsmith, benlangmuir, arphaman.
Herald added a subscriber: ributzka.
Herald added a project: All.
vsapsai requested review of this revision.
Herald added a project: clang.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130138

Files:
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130138.446016.patch
Type: text/x-patch
Size: 28419 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220720/a010ad82/attachment-0001.bin>


More information about the cfe-commits mailing list