From fa42b7cf2949802ff0b8a63a2e111a2a68711067 Mon Sep 17 00:00:00 2001 From: Logan Smith Date: Tue, 21 Jul 2020 09:11:53 -0700 Subject: [PATCH] [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 --- clang-tools-extra/unittests/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clang-tools-extra/unittests/CMakeLists.txt b/clang-tools-extra/unittests/CMakeLists.txt index 086a68e..751827c 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) -- 2.7.4