Closed StreetwareGames closed 8 months ago
@llvm/issue-subscribers-clang-frontend
Author: None (SewerDweller)
Hum, this is actually consistent with GCC https://godbolt.org/z/re8Y5W1Wv and it is a separate flag from -Wswitch
.
I now remember that it was the intent of this flag (and note that it is not enabled under -Wall, -Wextra
This was added by https://github.com/llvm/llvm-project/pull/73077
This is correct. Some users want one, and some want the other, so both are provided.
It is expected behavior for -Weverything
to include contradicting diagnostics, see the docs. As the docs also mention, it's not recommended to use -Weverything
.
This stackexchange answer is also worth a read: https://softwareengineering.stackexchange.com/a/124574/84604
foo() warns about a default case missing, while foo2() warns about a default case being present when every enum case is already handled.
https://godbolt.org/z/WxooaoeMK