logan-5 created this revision.
logan-5 added a reviewer: mgorny.
logan-5 added a project: clang.
Herald added a subscriber: cfe-commits.
Yesterday I enabled `-Wsuggest-override` in the main LLVM build and have been
fighting with the -Werror bots ever since. The key culprits making this
difficult are googletest and googlemock, which do not use the `override`
keyword in their sources, so any files that include them are met with massive
warning (or error, in the case of -Werror) spam.
I've been going through and playing whack-a-mole by adding
`-Wno-suggest-override` to directories that have code that uses gtest and/or
gmock; this approach is feeling increasingly inelegant the more I do it, but
all the patches I've submitted for review have been LGTM'd so far.
I'm wondering if I should do this a different way, or if it's fine to just
proceed along this path until the bots are green again.
Thank you for your review.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D84244
Files:
clang/unittests/CMakeLists.txt
Index: clang/unittests/CMakeLists.txt
===================================================================
--- clang/unittests/CMakeLists.txt
+++ clang/unittests/CMakeLists.txt
@@ -10,6 +10,10 @@
endif()
endif()
+if (CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG)
+ add_definitions("-Wno-suggest-override")
+endif()
+
# add_clang_unittest(test_dirname file1.cpp file2.cpp)
#
# Will compile the list of files together and link against the clang
Index: clang/unittests/CMakeLists.txt
===================================================================
--- clang/unittests/CMakeLists.txt
+++ clang/unittests/CMakeLists.txt
@@ -10,6 +10,10 @@
endif()
endif()
+if (CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG)
+ add_definitions("-Wno-suggest-override")
+endif()
+
# add_clang_unittest(test_dirname file1.cpp file2.cpp)
#
# Will compile the list of files together and link against the clang
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits