Add tautological compare warnings to clang builds

* This should help catch any accidental use of size_t with rdcstr find functions
This commit is contained in:
baldurk
2019-12-16 18:10:32 +00:00
parent 14d01ff995
commit 0e3b1f4129
+1 -1
View File
@@ -328,7 +328,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
list(APPEND warning_flags -Wnewline-eof -Wunreachable-code-break -Wclass-varargs -Wstring-conversion)
list(APPEND warning_flags -Wnewline-eof -Wunreachable-code-break -Wclass-varargs -Wstring-conversion -Wtautological-compare -Wtautological-constant-in-range-compare)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.9)