| Issue |
185394
|
| Summary |
clang-scan-deps ignores warning supressions
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
anarthal
|
With the following file:
```cpp
module;
export module mylib;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winclude-angled-in-module-purview"
#include <header.hpp> // header contents irrelevant
```
And the following build command:
```sh
#!/bin/bash
set -e
SRCDIR="$(cd "$(dirname "$0")" && pwd)"
clang-scan-deps-22 \
-- \
clang++-22 \
-I"$SRCDIR" \
-stdlib=libc++ \
-g \
-std=c++23 \
-x c++ \
"$SRCDIR/mylib.cpp" \
-c -o mylib.cpp.o
```
The pragma seems to be ignored:
```
Diagnostics while scanning dependencies for '[redacted]/modules-pg2/mylib.cpp':
[redacted]/modules-pg2/mylib.cpp:8:10: warning: '#include <filename>' attaches the declarations to the named module 'mylib', which is not usually intended; consider moving that directive before the module declaration
mylib.cpp.o: [redacted]/modules-pg2/mylib.cpp \
[redacted]/modules-pg2/header.hpp
```
The compiler does not emit the diagnostic. It is only the scanner. This creates a cluttered log when legitimately including files in the purview to create module bindings.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs