Bug 1453990 - Disable -Werror on -Wreturn-std-move. We have a false positive with nsAutoCString r?froydnj draft
authorSylvestre Ledru <sledru@mozilla.com>
Sat, 12 May 2018 12:00:39 +0200
changeset 794527 d6abd44685c1c8c2b34058e45e05bace5a19cb9f
parent 794526 809b0329507e97d46600f52fe33d1c0fb2e118cf
child 794528 a441fc039f39c676f788db7ef5ee5fc26e53eb01
push id109697
push userbmo:sledru@mozilla.com
push dateSat, 12 May 2018 10:04:34 +0000
reviewersfroydnj
bugs1453990, 37249
milestone62.0a1
Bug 1453990 - Disable -Werror on -Wreturn-std-move. We have a false positive with nsAutoCString r?froydnj See: https://bugs.llvm.org/show_bug.cgi?id=37249
build/moz.configure/warnings.configure
--- a/build/moz.configure/warnings.configure
+++ b/build/moz.configure/warnings.configure
@@ -97,16 +97,20 @@ check_and_add_gcc_warning('-Wno-error=ar
 check_and_add_gcc_warning('-Wno-error=coverage-mismatch', when='MOZ_PGO')
 
 # false positives depending on optimizations
 check_and_add_gcc_warning('-Wno-error=free-nonheap-object')
 
 # Would be a pain to fix all occurrences, for very little gain
 check_and_add_gcc_warning('-Wno-error=multistatement-macros')
 
+# Disable the -Werror for return-std-move because of a false positive
+# on nsTAutoStringN: https://bugs.llvm.org/show_bug.cgi?id=37249
+check_and_add_gcc_warning('-Wno-error=return-std-move')
+
 # catches format/argument mismatches with printf
 c_format_warning, cxx_format_warning = check_and_add_gcc_warning(
     '-Wformat', when=depends(target)(lambda t: t.kernel != 'WINNT'))
 
 # Add compile-time warnings for unprotected functions and format functions
 # that represent possible security problems. Enable this only when -Wformat
 # is enabled, otherwise it is an error
 check_and_add_gcc_warning('-Wformat-security',