From fd50d175adc1af6538cc9539fc13c7e2d23f027e Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Mon, 12 Aug 2024 14:41:09 +0800 Subject: [PATCH] Bump pessimizing-move from -Wno to -Wno-error This is a useful warning that can point out lower performance code. https://r.android.com/q/hashtag:pessimizing-move-cleanup cleaned up many cases. Let's bump this up to a non-error warning while we fix up the remaining cases. The warning remains off for all external code. Test: presubmit Bug: 154270751 Change-Id: If6b69cbaa1384e81336b6842607a587bf6c7f38b --- cc/config/global.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cc/config/global.go b/cc/config/global.go index 9e3919042..79507135e 100644 --- a/cc/config/global.go +++ b/cc/config/global.go @@ -275,7 +275,7 @@ var ( "-Wno-zero-as-null-pointer-constant", // http://b/68236239 "-Wno-deprecated-anon-enum-enum-conversion", // http://b/153746485 "-Wno-deprecated-enum-enum-conversion", - "-Wno-pessimizing-move", // http://b/154270751 + "-Wno-error=pessimizing-move", // http://b/154270751 // New warnings to be fixed after clang-r399163 "-Wno-non-c-typedef-for-linkage", // http://b/161304145 // New warnings to be fixed after clang-r428724 @@ -368,6 +368,7 @@ var ( "-Wno-unqualified-std-cast-call", "-Wno-array-parameter", "-Wno-gnu-offsetof-extensions", + "-Wno-pessimizing-move", // TODO: Enable this warning http://b/315245071 "-Wno-fortify-source", }