logan-5 created this revision.
logan-5 added reviewers: aaron.ballman, klimek, alexfh, juliehockett, sammccall.
logan-5 added a project: clang-tools-extra.
Herald added subscribers: cfe-commits, mgorny.
Herald added a project: clang.

I added `-Wsuggest-override` to the LLVM build earlier today, and have been 
putting out small fires I caused since then. One sticky area here has been 
directories that have files that include googlemock and/or googletest headers, 
which unfortunately do not themselves use `override`, so I've had to add 
`-Wno-suggest-override` to the CMakeLists.txt's in those directories. This 
patch adds this same flag to CMakeLists.txt in clang-tools-extra/unittests. I 
just wanted to get the LGTM from one or more of you fine folks before I 
committed it.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84213

Files:
  clang-tools-extra/unittests/CMakeLists.txt


Index: clang-tools-extra/unittests/CMakeLists.txt
===================================================================
--- clang-tools-extra/unittests/CMakeLists.txt
+++ clang-tools-extra/unittests/CMakeLists.txt
@@ -5,6 +5,10 @@
   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)


Index: clang-tools-extra/unittests/CMakeLists.txt
===================================================================
--- clang-tools-extra/unittests/CMakeLists.txt
+++ clang-tools-extra/unittests/CMakeLists.txt
@@ -5,6 +5,10 @@
   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)
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to