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 794529 a95aba7b723202eb3a0f215ae62a78faa4adfa86
parent 794526 809b0329507e97d46600f52fe33d1c0fb2e118cf
push id109698
push userbmo:sledru@mozilla.com
push dateSat, 12 May 2018 10:05:54 +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 MozReview-Commit-ID: VFvj33eeOm
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',