On Thu Oct 12 09:12:11 2023 +0000, Giovanni Mascellani wrote:
Nothing really, besides that by default clangd emits a warning for all
fall-throughs (that are not annotated in a [rather specific way](https://clang.llvm.org/docs/AttributeReference.html#fallthrough)) so this warning shows in many places, but those in 1/5 and 5/5 can be seamlessly removed. This happens also on macOS (where the compiler is based on clang), and is the reason why we have `-Wno-implicit-fallthrough` in `build-mac` for the CI. I would solve it properly rather than reorganize our code around that. It seems that both gcc and clang accept `__attribute__((fallthrough));` as a fall through marker. So I would defined a macro called `VKD3D_FALLTHROUGH` that expands to that on gcc and clang and to nothing on other compilers. Then I'd remove `-Wno-implicit-fallthrough` from `build-mac`.
I should add, though, that both proposed changes to avoid case fallthrough mostly make sense to me in their own, as they make the code a tad more readable, so I'm accepting the change anyway. My suggestion still stands for the other fallthrough cases in the code (mostly `ir.c`, I think), but doesn't have to be in this MR.