Bug 1483761 - Enable clang's -Wc++2a-compat warnings. r=glandium
authorChris Peterson <cpeterson@mozilla.com>
Wed, 15 Aug 2018 10:02:07 -0700
changeset 432983 f9a890fba236bdcd13e72cbede68c9d6755f3b78
parent 432982 96c84ecff48708165d27b56260f11d60c04166d2
child 432984 36f6bab3d669cef41b9b2089e9081af388ce1c2b
push id34495
push userrgurzau@mozilla.com
push dateThu, 23 Aug 2018 09:41:47 +0000
treeherdermozilla-central@32c6c1848f14 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1483761 - Enable clang's -Wc++2a-compat warnings. r=glandium Warn about C++ constructs whose meaning change in C++2a. https://clang.llvm.org/docs/DiagnosticsReference.html#wc-2a-compat So far the only -Wc++2a-compat check that I know of is for valid pre-C++2a code that inadvertently parses as C++2a's new <=> "spaceship" comparison operator. `f<&A::operator<=>();` is an example of a warning reported for a real project on GitHub. That code can be rewritten as `f< &operator<= >();`. There are currently no -Wc++2a-compat warnings in mozilla-central. Differential Revision: https://phabricator.services.mozilla.com/D3478
--- a/build/moz.configure/warnings.configure
+++ b/build/moz.configure/warnings.configure
@@ -50,16 +50,17 @@ add_gcc_warning('-Wno-invalid-offsetof',
 # catches objects passed by value to variadic functions.
 # catches issues around loops
 # catches C++ version forward-compat issues
 check_and_add_gcc_warning('-Wc++1z-compat', cxx_compiler)
+check_and_add_gcc_warning('-Wc++2a-compat', cxx_compiler)
 # catches possible misuse of the comma operator
 check_and_add_gcc_warning('-Wcomma', cxx_compiler)
 # catches duplicated conditions in if-else-if chains
 # catches unintentional switch case fallthroughs