[clang] [clang][modules] -Wmodule-import-in-extern-c should not be an error by default (PR #184530)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 3 17:51:09 PST 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 53032 tests passed
* 1003 tests skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.Modules/auto-module-import.m</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
rm -rf C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\auto-module-import.m.tmp
# executed command: rm -rf 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\auto-module-import.m.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -Rmodule-include-translation -Wno-private-module -fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\auto-module-import.m.tmp -fmodules -fimplicit-module-maps -F C:\_work\llvm-project\llvm-project\clang\test\Modules/Inputs C:\_work\llvm-project\llvm-project\clang\test\Modules\auto-module-import.m -verify -DERRORS
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -Rmodule-include-translation -Wno-private-module '-fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\auto-module-import.m.tmp' -fmodules -fimplicit-module-maps -F 'C:\_work\llvm-project\llvm-project\clang\test\Modules/Inputs' 'C:\_work\llvm-project\llvm-project\clang\test\Modules\auto-module-import.m' -verify -DERRORS
# note: command had no output on stdout or stderr
# RUN: at line 3
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -Rmodule-include-translation -Wno-private-module -fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\auto-module-import.m.tmp -fmodules -fimplicit-module-maps -F C:\_work\llvm-project\llvm-project\clang\test\Modules/Inputs C:\_work\llvm-project\llvm-project\clang\test\Modules\auto-module-import.m -verify
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -Rmodule-include-translation -Wno-private-module '-fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\auto-module-import.m.tmp' -fmodules -fimplicit-module-maps -F 'C:\_work\llvm-project\llvm-project\clang\test\Modules/Inputs' 'C:\_work\llvm-project\llvm-project\clang\test\Modules\auto-module-import.m' -verify
# note: command had no output on stdout or stderr
# RUN: at line 4
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -Rmodule-include-translation -Wno-private-module -fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\auto-module-import.m.tmp -fmodules -fimplicit-module-maps -F C:\_work\llvm-project\llvm-project\clang\test\Modules/Inputs -xobjective-c++ C:\_work\llvm-project\llvm-project\clang\test\Modules\auto-module-import.m -verify
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -Rmodule-include-translation -Wno-private-module '-fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\auto-module-import.m.tmp' -fmodules -fimplicit-module-maps -F 'C:\_work\llvm-project\llvm-project\clang\test\Modules/Inputs' -xobjective-c++ 'C:\_work\llvm-project\llvm-project\clang\test\Modules\auto-module-import.m' -verify
# .---command stderr------------
# | error: 'expected-error' diagnostics expected but not seen:
# | File C:\_work\llvm-project\llvm-project\clang\test\Modules\auto-module-import.m Line 98: import of C++ module 'NoUmbrella.A' appears within extern "C"
# | error: 'expected-warning' diagnostics seen but not expected:
# | File C:\_work\llvm-project\llvm-project\clang\test\Modules\auto-module-import.m Line 98: import of C++ module 'NoUmbrella.A' appears within extern "C" language linkage specification
# | 2 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.Modules/extern_c.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
rm -rf C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\extern_c.cpp.tmp
# executed command: rm -rf 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\extern_c.cpp.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\extern_c.cpp.tmp -I C:\_work\llvm-project\llvm-project\clang\test\Modules/Inputs C:\_work\llvm-project\llvm-project\clang\test\Modules\extern_c.cpp
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -fmodules -fimplicit-module-maps -verify '-fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\extern_c.cpp.tmp' -I 'C:\_work\llvm-project\llvm-project\clang\test\Modules/Inputs' 'C:\_work\llvm-project\llvm-project\clang\test\Modules\extern_c.cpp'
# note: command had no output on stdout or stderr
# RUN: at line 3
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\extern_c.cpp.tmp -I C:\_work\llvm-project\llvm-project\clang\test\Modules/Inputs C:\_work\llvm-project\llvm-project\clang\test\Modules\extern_c.cpp -DEXTERN_C
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -fmodules -fimplicit-module-maps -verify '-fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\extern_c.cpp.tmp' -I 'C:\_work\llvm-project\llvm-project\clang\test\Modules/Inputs' 'C:\_work\llvm-project\llvm-project\clang\test\Modules\extern_c.cpp' -DEXTERN_C
# note: command had no output on stdout or stderr
# RUN: at line 4
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\extern_c.cpp.tmp -I C:\_work\llvm-project\llvm-project\clang\test\Modules/Inputs C:\_work\llvm-project\llvm-project\clang\test\Modules\extern_c.cpp -DEXTERN_CXX
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -fmodules -fimplicit-module-maps -verify '-fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\extern_c.cpp.tmp' -I 'C:\_work\llvm-project\llvm-project\clang\test\Modules/Inputs' 'C:\_work\llvm-project\llvm-project\clang\test\Modules\extern_c.cpp' -DEXTERN_CXX
# note: command had no output on stdout or stderr
# RUN: at line 5
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\extern_c.cpp.tmp -I C:\_work\llvm-project\llvm-project\clang\test\Modules/Inputs C:\_work\llvm-project\llvm-project\clang\test\Modules\extern_c.cpp -DEXTERN_C -DEXTERN_CXX
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -fmodules -fimplicit-module-maps -verify '-fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\extern_c.cpp.tmp' -I 'C:\_work\llvm-project\llvm-project\clang\test\Modules/Inputs' 'C:\_work\llvm-project\llvm-project\clang\test\Modules\extern_c.cpp' -DEXTERN_C -DEXTERN_CXX
# note: command had no output on stdout or stderr
# RUN: at line 6
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -fmodules -fimplicit-module-maps -verify -fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\extern_c.cpp.tmp -I C:\_work\llvm-project\llvm-project\clang\test\Modules/Inputs C:\_work\llvm-project\llvm-project\clang\test\Modules\extern_c.cpp -DEXTERN_C -DNAMESPACE
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -fmodules -fimplicit-module-maps -verify '-fmodules-cache-path=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Modules\Output\extern_c.cpp.tmp' -I 'C:\_work\llvm-project\llvm-project\clang\test\Modules/Inputs' 'C:\_work\llvm-project\llvm-project\clang\test\Modules\extern_c.cpp' -DEXTERN_C -DNAMESPACE
# .---command stderr------------
# | error: 'expected-error' diagnostics seen but not expected:
# | File C:\_work\llvm-project\llvm-project\clang\test\Modules\extern_c.cpp Line 39: import of module 'c_library.inner' appears within namespace 'M'
# | error: 'expected-warning' diagnostics expected but not seen:
# | File C:\_work\llvm-project\llvm-project\clang\test\Modules\extern_c.cpp Line 39 (directive at C:\_work\llvm-project\llvm-project\clang\test\Modules\extern_c.cpp:42): import of module '{{c_library.inner|cxx_library}}' appears within namespace 'M'
# | 2 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/184530
More information about the cfe-commits
mailing list