-isystem
does not suppress warnings from macros
#129746
Labels
clang:diagnostics
New/improved warning or error message in Clang, but not in clang-tidy or static analyzer
Given a header
provoke_warning.hpp
:And a source file
main.cpp
:When compile with:
clang -std=c++17 -isystem . -c main.cpp
We get:
Notice that the warning we would get from the
using enum
inside the namespace is not emitted (because of-isystem
). However the use of the macro still gives a warning despite the fact that the macro came from a header included under-isystem
.--
I see why this could be difficult to remedy, and I already see the counterarguments: "it's a macro! It's in your code, not the library code!" So it's understandable why this happens, but that doesn't make it correct or expected.
This comes up in real code: catchorg/Catch2#2910
The text was updated successfully, but these errors were encountered: