From 0e3b1f4129d80f50ee4d3f95e609ae57aaf3cdf9 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 6 Dec 2019 13:54:56 +0000 Subject: [PATCH] Add tautological compare warnings to clang builds * This should help catch any accidental use of size_t with rdcstr find functions --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9233fb210..74466098d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)