[clang-tools-extra] fa42b7c - [clang-tools-extra] Disable -Wsuggest-override for unittests/
Logan Smith via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 21 09:13:17 PDT 2020
Author: Logan Smith
Date: 2020-07-21T09:11:53-07:00
New Revision: fa42b7cf2949802ff0b8a63a2e111a2a68711067
URL: https://github.com/llvm/llvm-project/commit/fa42b7cf2949802ff0b8a63a2e111a2a68711067
DIFF: https://github.com/llvm/llvm-project/commit/fa42b7cf2949802ff0b8a63a2e111a2a68711067.diff
LOG: [clang-tools-extra] Disable -Wsuggest-override for unittests/
This avoids massive warning spam due to the unit tests' use of gtest and gmock, which do not use the 'override' keyword in their sources.
Differential Revision: https://reviews.llvm.org/D84213
Added:
Modified:
clang-tools-extra/unittests/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang-tools-extra/unittests/CMakeLists.txt b/clang-tools-extra/unittests/CMakeLists.txt
index 086a68e63830..751827cd2a0f 100644
--- a/clang-tools-extra/unittests/CMakeLists.txt
+++ b/clang-tools-extra/unittests/CMakeLists.txt
@@ -5,6 +5,10 @@ function(add_extra_unittest test_dirname)
add_unittest(ExtraToolsUnitTests ${test_dirname} ${ARGN})
endfunction()
+if (CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG)
+ add_definitions("-Wno-suggest-override")
+endif()
+
add_subdirectory(clang-apply-replacements)
add_subdirectory(clang-change-namespace)
add_subdirectory(clang-doc)
More information about the cfe-commits
mailing list