Downgrade reserved module identifier error into a warning
authorAaron Ballman <aaron@aaronballman.com>
Tue, 28 Mar 2023 12:52:37 +0000 (08:52 -0400)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 28 Mar 2023 12:53:44 +0000 (08:53 -0400)
commite574833c2bc46a39150156eb973d0efb142bc618
tree5ecd6be91f2b343a57acf18f633d3fc087143683
parent5aef3dfad685f3129ffd4c4066963c8026693673
Downgrade reserved module identifier error into a warning

Any project that wants to import std; potentially needs to be able to
build a module that does export std;. We silenced the error diagnostic
if the module identified itself as a system header, but this isn't
quite good enough, what we really need is a way to identify a system
module. It would be nice for that feature to be shared among the major
implementations, so this downgrades the diagnostic from an error to a
warning temporarily to give implementers time to determine what that
mechanism will look like. We may convert this warning back into an
error in a future release of Clang, but it's not guaranteed we will do
so.

Fixes https://github.com/llvm/llvm-project/issues/61446
Differential Revision: https://reviews.llvm.org/D146986
clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaModule.cpp
clang/test/Modules/reserved-names-1.cpp