From: Logan Smith Date: Tue, 21 Jul 2020 16:11:53 +0000 (-0700) Subject: [clang-tools-extra] Disable -Wsuggest-override for unittests/ X-Git-Tag: llvmorg-13-init~17278 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa42b7cf2949802ff0b8a63a2e111a2a68711067;p=platform%2Fupstream%2Fllvm.git [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 --- 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)