| Issue |
124153
|
| Summary |
[clangd] `PrerequisiteModulesTests` Generating Unexpected Error when Scanning for Dependencies on macOS
|
| Labels |
clangd
|
| Assignees |
|
| Reporter |
qiongsiwu
|
`clangd`'s `PrerequisiteModulesTests` are passing on macOS, but produces unexpected diagnostic errors. This is reproducible using commit `bb6e94a05d15d289e3685c5599f0eb905dc46925`.
For example
```
$ ./tools/clang/tools/extra/clangd/unittests/ClangdTests --gtest_filter="PrerequisiteModulesTests.*"
Note: Google Test filter = PrerequisiteModulesTests.*
[==========] Running 8 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 8 tests from PrerequisiteModulesTests
[ RUN ] PrerequisiteModulesTests.NonModularTest
[ OK ] PrerequisiteModulesTests.NonModularTest (10 ms)
[ RUN ] PrerequisiteModulesTests.ModuleWithoutDepTest
[ OK ] PrerequisiteModulesTests.ModuleWithoutDepTest (2 ms)
[ RUN ] PrerequisiteModulesTests.ModuleWithDepTest
Scanning modules dependencies for foo.h failed: error: invalid argument '-std=c++20' not allowed with 'C'
Scanning modules dependencies for foo.h failed: error: invalid argument '-std=c++20' not allowed with 'C'
Ignored diagnostic. argument unused during compilation: '-c'
Built module N:Part to /var/folders/50/tcq20qrs2wj563qz76hymwlc0000gn/T/clangd/module_files/N-part.cppm2503448646646106135-79-eb-1a-03-e9-78/N-Part.pcm
Scanning modules dependencies for foo.h failed: error: invalid argument '-std=c++20' not allowed with 'C'
Scanning modules dependencies for foo.h failed: error: invalid argument '-std=c++20' not allowed with 'C'
Ignored diagnostic. argument unused during compilation: '-c'
Built module M to /var/folders/50/tcq20qrs2wj563qz76hymwlc0000gn/T/clangd/module_files/M.cppm5130802603315192334-a5-3f-5b-38-18-91/M.pcm
...
```
@ChuanqiXu9 pointed out that the errors should be fixed in `clangd` (https://github.com/llvm/llvm-project/pull/66462#issuecomment-2608685410) instead of updating the tests.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs