diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-05-02 01:57:22 -0400 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-05-02 01:57:22 -0400 |
commit | 2007d0e4a0ad730415567df47fd700c63e2ac0ed (patch) | |
tree | 00c0b4d7b93514ce3d18b63721deb360a2e40c97 /src/CMakeLists.txt | |
parent | 47938541c25528d1122e15b87dc0113bbbe94d13 (diff) |
CMakeLists: Enable checks on Clang
Enables shadow-uncaptured-locals and implicit-fallthrough for Clang.
implicit-fallthrough is not enabled by default in -Wall or -Wextra, and
shadow-uncaptured-local doesn't seem to be enabled by default by
-Wshadow, even though GCC has both of these by their respective cases.
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 312a49f42..48ddbef9d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -113,6 +113,8 @@ else() $<$<CXX_COMPILER_ID:Clang>:-Wno-braced-scalar-init> $<$<CXX_COMPILER_ID:Clang>:-Wno-unused-private-field> + $<$<CXX_COMPILER_ID:Clang>:-Werror=shadow-uncaptured-local> + $<$<CXX_COMPILER_ID:Clang>:-Werror=implicit-fallthrough> $<$<CXX_COMPILER_ID:AppleClang>:-Wno-braced-scalar-init> $<$<CXX_COMPILER_ID:AppleClang>:-Wno-unused-private-field> ) |