compiler_wrapper: Disable warning implicit-function-declaration

Wimplicit-function-declaration has been promoted to be an default error
even with Wno-error. Disable the error by default since it is breaking
a lot of packages.

BUG=b:230345382
TEST=cq

Change-Id: Ib46b0b47a3e1dea3797739370a4d9cf92a4d25f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3637117
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Auto-Submit: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: George Burgess <gbiv@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
diff --git a/compiler_wrapper/config.go b/compiler_wrapper/config.go
index 301dda6..e6708eb 100644
--- a/compiler_wrapper/config.go
+++ b/compiler_wrapper/config.go
@@ -130,6 +130,7 @@
 	// crbug.com/1103065: -grecord-gcc-switches pollutes the Goma cache;
 	//   removed that flag for now.
 	// Temporarily disable Wdeprecated-declarations. b/193860318
+	// b/230345382: Temporarily disable Wimplicit-function-declaration.
 
 	clangFlags: []string{
 		"-Qunused-arguments",
@@ -146,6 +147,7 @@
 		"-fexperimental-new-pass-manager",
 		"-Wno-compound-token-split-by-macro",
 		"-Wno-deprecated-declarations",
+		"-Wno-error=implicit-function-declaration",
 	},
 
 	// Temporarily disable Wdeprecated-copy. b/191479033
@@ -175,6 +177,7 @@
 	// Temporarily add no-unknown-warning-option to deal with old clang versions.
 	// Temporarily disable Wsection since kernel gets a bunch of these. chromium:778867
 	// Temporarily disable Wdeprecated-declarations. b/193860318
+	// b/230345382: Temporarily disable Wimplicit-function-declaration.
 	clangFlags: []string{
 		"-Qunused-arguments",
 		"-fdebug-default-version=5",
@@ -187,6 +190,7 @@
 		"-fexperimental-new-pass-manager",
 		"-Wno-compound-token-split-by-macro",
 		"-Wno-deprecated-declarations",
+		"-Wno-error=implicit-function-declaration",
 	},
 
 	// Temporarily disable Wdeprecated-copy. b/191479033
@@ -221,6 +225,7 @@
 	// crbug.com/1103065: -grecord-gcc-switches pollutes the Goma cache;
 	//   removed that flag for now.
 	// Temporarily disable Wdeprecated-declarations. b/193860318
+	// b/230345382: Temporarily disable Wimplicit-function-declaration.
 	clangFlags: []string{
 		"-Qunused-arguments",
 		"-fno-addrsig",
@@ -235,6 +240,7 @@
 		"-fexperimental-new-pass-manager",
 		"-Wno-compound-token-split-by-macro",
 		"-Wno-deprecated-declarations",
+		"-Wno-error=implicit-function-declaration",
 	},
 
 	// Temporarily disable Wdeprecated-copy. b/191479033
diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/bisect.json b/compiler_wrapper/testdata/cros_clang_host_golden/bisect.json
index e237c7c..b8abc56 100644
--- a/compiler_wrapper/testdata/cros_clang_host_golden/bisect.json
+++ b/compiler_wrapper/testdata/cros_clang_host_golden/bisect.json
@@ -37,14 +37,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ],
           "env_updates": [
             "PYTHONPATH=/somepath/test_binary"
@@ -92,14 +92,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ],
           "env_updates": [
             "PYTHONPATH=/somepath/test_binary"
@@ -150,14 +150,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ],
           "env_updates": [
             "PYTHONPATH=/somepath/test_binary"
diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clang_ftrapv_maincc_target_specific.json b/compiler_wrapper/testdata/cros_clang_host_golden/clang_ftrapv_maincc_target_specific.json
index 07fccc6..5e903aa 100644
--- a/compiler_wrapper/testdata/cros_clang_host_golden/clang_ftrapv_maincc_target_specific.json
+++ b/compiler_wrapper/testdata/cros_clang_host_golden/clang_ftrapv_maincc_target_specific.json
@@ -28,14 +28,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -70,14 +70,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -112,14 +112,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -154,14 +154,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -196,14 +196,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -238,14 +238,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -280,14 +280,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -322,14 +322,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -364,14 +364,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clang_host_wrapper.json b/compiler_wrapper/testdata/cros_clang_host_golden/clang_host_wrapper.json
index a221605..c2df911 100644
--- a/compiler_wrapper/testdata/cros_clang_host_golden/clang_host_wrapper.json
+++ b/compiler_wrapper/testdata/cros_clang_host_golden/clang_host_wrapper.json
@@ -27,14 +27,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clang_maincc_target_specific.json b/compiler_wrapper/testdata/cros_clang_host_golden/clang_maincc_target_specific.json
index 2130d52..77953e7 100644
--- a/compiler_wrapper/testdata/cros_clang_host_golden/clang_maincc_target_specific.json
+++ b/compiler_wrapper/testdata/cros_clang_host_golden/clang_maincc_target_specific.json
@@ -27,14 +27,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -68,14 +68,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -109,14 +109,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -150,14 +150,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -191,14 +191,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -232,14 +232,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -273,14 +273,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -314,14 +314,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -355,14 +355,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clang_path.json b/compiler_wrapper/testdata/cros_clang_host_golden/clang_path.json
index 43ae728..ac5f51f 100644
--- a/compiler_wrapper/testdata/cros_clang_host_golden/clang_path.json
+++ b/compiler_wrapper/testdata/cros_clang_host_golden/clang_path.json
@@ -27,14 +27,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -71,14 +71,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         },
         "stdout": "somemessage",
@@ -115,14 +115,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -159,14 +159,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -210,6 +210,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-resource-dir=someResourceDir",
@@ -218,8 +219,7 @@
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -266,6 +266,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-resource-dir=someResourceDir",
@@ -274,8 +275,7 @@
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -322,6 +322,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-resource-dir=someResourceDir",
@@ -330,8 +331,7 @@
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         },
         "stdout": "somemessage",
@@ -368,14 +368,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -409,14 +409,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -450,14 +450,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -491,14 +491,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -535,14 +535,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clang_sanitizer_args.json b/compiler_wrapper/testdata/cros_clang_host_golden/clang_sanitizer_args.json
index b8b28cd..6520086 100644
--- a/compiler_wrapper/testdata/cros_clang_host_golden/clang_sanitizer_args.json
+++ b/compiler_wrapper/testdata/cros_clang_host_golden/clang_sanitizer_args.json
@@ -29,6 +29,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fsanitize=kernel-address",
@@ -36,8 +37,7 @@
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -73,6 +73,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fsanitize=kernel-address",
@@ -80,8 +81,7 @@
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -117,6 +117,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fsanitize=kernel-address",
@@ -124,8 +125,7 @@
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -161,6 +161,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fsanitize=kernel-address",
@@ -168,8 +169,7 @@
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -204,6 +204,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fsanitize=fuzzer",
@@ -211,8 +212,7 @@
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -248,6 +248,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fsanitize=address",
@@ -256,8 +257,7 @@
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -292,6 +292,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fsanitize=address",
@@ -299,8 +300,7 @@
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -335,6 +335,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fprofile-instr-generate",
@@ -342,8 +343,7 @@
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clang_specific_args.json b/compiler_wrapper/testdata/cros_clang_host_golden/clang_specific_args.json
index 7c4afd3..99ac75c 100644
--- a/compiler_wrapper/testdata/cros_clang_host_golden/clang_specific_args.json
+++ b/compiler_wrapper/testdata/cros_clang_host_golden/clang_specific_args.json
@@ -37,6 +37,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-mno-movbe",
@@ -51,8 +52,7 @@
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -87,6 +87,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-Wno-#warnings",
@@ -94,8 +95,7 @@
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -130,6 +130,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-Wno-error=uninitialized",
@@ -137,8 +138,7 @@
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -173,6 +173,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-someflag",
@@ -180,8 +181,7 @@
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clangtidy.json b/compiler_wrapper/testdata/cros_clang_host_golden/clangtidy.json
index f678ba6..1371acb 100644
--- a/compiler_wrapper/testdata/cros_clang_host_golden/clangtidy.json
+++ b/compiler_wrapper/testdata/cros_clang_host_golden/clangtidy.json
@@ -43,14 +43,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       },
@@ -71,14 +71,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -129,14 +129,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       },
@@ -157,14 +157,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -217,14 +217,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         },
         "stdout": "somemessage",
@@ -248,14 +248,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -309,14 +309,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       },
@@ -337,14 +337,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         },
         "stdout": "somemessage",
diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/force_disable_werror.json b/compiler_wrapper/testdata/cros_clang_host_golden/force_disable_werror.json
index f5a7771..821682a 100644
--- a/compiler_wrapper/testdata/cros_clang_host_golden/force_disable_werror.json
+++ b/compiler_wrapper/testdata/cros_clang_host_golden/force_disable_werror.json
@@ -30,14 +30,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         }
       }
@@ -74,14 +74,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         },
         "stderr": "-Werror originalerror",
@@ -104,6 +104,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
@@ -111,7 +112,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-Wno-error",
             "-Wno-error=poison-system-directories"
           ]
@@ -152,14 +152,14 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
             "-Wno-implicit-int-float-conversion",
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
-            "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable"
+            "-Wno-deprecated-copy"
           ]
         },
         "stderr": "-Werror originalerror",
@@ -182,6 +182,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "main.cc",
@@ -189,7 +190,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-Wno-error",
             "-Wno-error=poison-system-directories"
           ]
diff --git a/compiler_wrapper/testdata/cros_hardened_golden/bisect.json b/compiler_wrapper/testdata/cros_hardened_golden/bisect.json
index 39d71b8..4fe52f3 100644
--- a/compiler_wrapper/testdata/cros_hardened_golden/bisect.json
+++ b/compiler_wrapper/testdata/cros_hardened_golden/bisect.json
@@ -40,6 +40,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -55,7 +56,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -113,6 +113,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -128,7 +129,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -189,6 +189,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -204,7 +205,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json
index 91953b2..d5b9a8d 100644
--- a/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json
+++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json
@@ -31,6 +31,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -47,7 +48,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -94,6 +94,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -110,7 +111,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -157,6 +157,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -173,7 +174,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -220,6 +220,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -236,7 +237,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv7m-cros-linux-gnu"
@@ -282,6 +282,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -298,7 +299,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv7m-cros-eabi"
@@ -344,6 +344,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -360,7 +361,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv7m-cros-win-gnu"
@@ -406,6 +406,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -422,7 +423,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv8m-cros-linux-gnu"
@@ -468,6 +468,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -484,7 +485,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv8m-cros-eabi"
@@ -530,6 +530,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -546,7 +547,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv8m-cros-win-gnu"
diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json
index ffe9134..69b6847 100644
--- a/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json
+++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json
@@ -30,6 +30,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -45,7 +46,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -91,6 +91,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -106,7 +107,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -152,6 +152,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -167,7 +168,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -213,6 +213,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -228,7 +229,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv7m-cros-linux-gnu"
@@ -273,6 +273,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -288,7 +289,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv7m-cros-eabi"
@@ -333,6 +333,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -348,7 +349,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv7m-cros-win-gnu"
@@ -393,6 +393,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -408,7 +409,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv8m-cros-linux-gnu"
@@ -453,6 +453,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -468,7 +469,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv8m-cros-eabi"
@@ -513,6 +513,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -528,7 +529,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv8m-cros-win-gnu"
diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json
index a01dc08..622dec3 100644
--- a/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json
+++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json
@@ -30,6 +30,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -45,7 +46,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -94,6 +94,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -109,7 +110,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -158,6 +158,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -173,7 +174,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -222,6 +222,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -237,7 +238,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -293,6 +293,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -310,7 +311,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -369,6 +369,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -386,7 +387,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -440,6 +440,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -457,7 +458,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -506,6 +506,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -521,7 +522,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -567,6 +567,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -582,7 +583,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-Ba/b/c/d/e/bin",
             "-target",
@@ -628,6 +628,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -643,7 +644,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-Ba/b/c/d/e/bin",
             "-target",
@@ -689,6 +689,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -704,7 +705,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../bin",
             "-target",
@@ -753,6 +753,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -768,7 +769,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json
index e0a2036..3b24f1b 100644
--- a/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json
+++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json
@@ -32,6 +32,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -47,7 +48,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -95,6 +95,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -110,7 +111,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -158,6 +158,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -173,7 +174,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -221,6 +221,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -236,7 +237,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -283,6 +283,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -298,7 +299,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -346,6 +346,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -362,7 +363,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -409,6 +409,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -424,7 +425,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -471,6 +471,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -487,7 +488,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_specific_args.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_specific_args.json
index 7a437ae..998df08 100644
--- a/compiler_wrapper/testdata/cros_hardened_golden/clang_specific_args.json
+++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_specific_args.json
@@ -40,6 +40,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -63,7 +64,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -110,6 +110,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -126,7 +127,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -173,6 +173,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -189,7 +190,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -236,6 +236,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -252,7 +253,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json
index 4bde083..40e814f 100644
--- a/compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json
+++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json
@@ -68,6 +68,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -83,7 +84,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -132,6 +132,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -147,7 +148,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -189,6 +189,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -202,7 +203,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -249,6 +249,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-D_FORTIFY_SOURCE=2",
@@ -263,7 +264,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -310,6 +310,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-D_FORTIFY_SOURCE=2",
@@ -324,7 +325,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv7a-cros-linux-gnueabihf"
@@ -369,6 +369,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -385,7 +386,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json b/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json
index dd3bc35..ffcf910 100644
--- a/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json
+++ b/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json
@@ -45,6 +45,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -60,7 +61,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -87,6 +87,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -102,7 +103,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -159,6 +159,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -174,7 +175,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -202,6 +202,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -217,7 +218,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -276,6 +276,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -291,7 +292,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -322,6 +322,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -337,7 +338,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -397,6 +397,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -412,7 +413,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -440,6 +440,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -455,7 +456,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_hardened_golden/force_disable_werror.json b/compiler_wrapper/testdata/cros_hardened_golden/force_disable_werror.json
index c5d2f9e..5761f8d 100644
--- a/compiler_wrapper/testdata/cros_hardened_golden/force_disable_werror.json
+++ b/compiler_wrapper/testdata/cros_hardened_golden/force_disable_werror.json
@@ -33,6 +33,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -48,7 +49,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -97,6 +97,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -112,7 +113,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -147,6 +147,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -162,7 +163,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -215,6 +215,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -230,7 +231,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -265,6 +265,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -280,7 +281,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_hardened_golden/gcc_clang_syntax.json b/compiler_wrapper/testdata/cros_hardened_golden/gcc_clang_syntax.json
index 0140c96..667446b 100644
--- a/compiler_wrapper/testdata/cros_hardened_golden/gcc_clang_syntax.json
+++ b/compiler_wrapper/testdata/cros_hardened_golden/gcc_clang_syntax.json
@@ -30,6 +30,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -45,7 +46,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -118,6 +118,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -133,7 +134,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -201,6 +201,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -216,7 +217,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -265,6 +265,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -280,7 +281,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/bisect.json b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/bisect.json
index 39d71b8..4fe52f3 100644
--- a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/bisect.json
+++ b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/bisect.json
@@ -40,6 +40,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -55,7 +56,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -113,6 +113,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -128,7 +129,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -189,6 +189,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -204,7 +205,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clang_path.json b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clang_path.json
index a01dc08..622dec3 100644
--- a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clang_path.json
+++ b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clang_path.json
@@ -30,6 +30,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -45,7 +46,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -94,6 +94,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -109,7 +110,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -158,6 +158,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -173,7 +174,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -222,6 +222,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -237,7 +238,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -293,6 +293,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -310,7 +311,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -369,6 +369,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -386,7 +387,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -440,6 +440,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -457,7 +458,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -506,6 +506,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -521,7 +522,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -567,6 +567,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -582,7 +583,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-Ba/b/c/d/e/bin",
             "-target",
@@ -628,6 +628,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -643,7 +644,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-Ba/b/c/d/e/bin",
             "-target",
@@ -689,6 +689,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -704,7 +705,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../bin",
             "-target",
@@ -753,6 +753,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -768,7 +769,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clangtidy.json b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clangtidy.json
index dd3bc35..ffcf910 100644
--- a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clangtidy.json
+++ b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/clangtidy.json
@@ -45,6 +45,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -60,7 +61,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -87,6 +87,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -102,7 +103,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -159,6 +159,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -174,7 +175,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -202,6 +202,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -217,7 +218,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -276,6 +276,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -291,7 +292,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -322,6 +322,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -337,7 +338,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -397,6 +397,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -412,7 +413,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -440,6 +440,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -455,7 +456,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/force_disable_werror.json b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/force_disable_werror.json
index c5d2f9e..5761f8d 100644
--- a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/force_disable_werror.json
+++ b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/force_disable_werror.json
@@ -33,6 +33,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -48,7 +49,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -97,6 +97,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -112,7 +113,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -147,6 +147,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -162,7 +163,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -215,6 +215,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -230,7 +231,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -265,6 +265,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -280,7 +281,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/gcc_clang_syntax.json b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/gcc_clang_syntax.json
index 0140c96..667446b 100644
--- a/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/gcc_clang_syntax.json
+++ b/compiler_wrapper/testdata/cros_hardened_llvmnext_golden/gcc_clang_syntax.json
@@ -30,6 +30,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -45,7 +46,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -118,6 +118,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -133,7 +134,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -201,6 +201,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -216,7 +217,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -265,6 +265,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -280,7 +281,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/bisect.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/bisect.json
index a58cafd..7549ed6 100644
--- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/bisect.json
+++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/bisect.json
@@ -39,6 +39,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -54,7 +55,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -108,6 +108,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -123,7 +124,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -180,6 +180,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -195,7 +196,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json
index 2040a62..9ad3125 100644
--- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json
+++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json
@@ -29,6 +29,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -44,7 +45,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -87,6 +87,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -102,7 +103,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -145,6 +145,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -160,7 +161,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -203,6 +203,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -218,7 +219,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -268,6 +268,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -285,7 +286,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -339,6 +339,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -356,7 +357,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -409,6 +409,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -426,7 +427,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -469,6 +469,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -484,7 +485,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -524,6 +524,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -539,7 +540,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-Ba/b/c/d/e/bin",
             "-target",
@@ -579,6 +579,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -594,7 +595,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-Ba/b/c/d/e/bin",
             "-target",
@@ -634,6 +634,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -649,7 +650,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../bin",
             "-target",
@@ -692,6 +692,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -707,7 +708,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/clangtidy.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/clangtidy.json
index dd3bc35..ffcf910 100644
--- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/clangtidy.json
+++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/clangtidy.json
@@ -45,6 +45,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -60,7 +61,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -87,6 +87,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -102,7 +103,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -159,6 +159,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -174,7 +175,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -202,6 +202,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -217,7 +218,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -276,6 +276,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -291,7 +292,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -322,6 +322,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -337,7 +338,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -397,6 +397,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -412,7 +413,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -440,6 +440,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -455,7 +456,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/force_disable_werror.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/force_disable_werror.json
index 1b6e1d9..5c033bf 100644
--- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/force_disable_werror.json
+++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/force_disable_werror.json
@@ -32,6 +32,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -47,7 +48,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -90,6 +90,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -105,7 +106,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -134,6 +134,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -149,7 +150,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -196,6 +196,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -211,7 +212,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -240,6 +240,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -255,7 +256,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_clang_syntax.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_clang_syntax.json
index 3742f01..362b9fc 100644
--- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_clang_syntax.json
+++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_clang_syntax.json
@@ -30,6 +30,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -45,7 +46,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -113,6 +113,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -128,7 +129,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -196,6 +196,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -211,7 +212,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -260,6 +260,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-fcommon",
             "-fstack-protector-strong",
@@ -275,7 +276,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/bisect.json b/compiler_wrapper/testdata/cros_nonhardened_golden/bisect.json
index 6c46fee..343a950 100644
--- a/compiler_wrapper/testdata/cros_nonhardened_golden/bisect.json
+++ b/compiler_wrapper/testdata/cros_nonhardened_golden/bisect.json
@@ -37,6 +37,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -46,7 +47,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -101,6 +101,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -110,7 +111,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -168,6 +168,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -177,7 +178,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_ftrapv_maincc_target_specific.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_ftrapv_maincc_target_specific.json
index 86960cc..b80818c 100644
--- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_ftrapv_maincc_target_specific.json
+++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_ftrapv_maincc_target_specific.json
@@ -28,6 +28,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -38,7 +39,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -82,6 +82,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-eabi-",
@@ -92,7 +93,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -136,6 +136,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-win-gnu-",
@@ -146,7 +147,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -190,6 +190,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "-mthumb",
@@ -201,7 +202,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv7m-cros-linux-gnu"
@@ -244,6 +244,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/armv7m-cros-eabi-",
@@ -254,7 +255,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv7m-cros-eabi"
@@ -297,6 +297,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "-mthumb",
@@ -308,7 +309,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv7m-cros-win-gnu"
@@ -351,6 +351,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "-mthumb",
@@ -362,7 +363,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv8m-cros-linux-gnu"
@@ -405,6 +405,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/armv8m-cros-eabi-",
@@ -415,7 +416,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv8m-cros-eabi"
@@ -458,6 +458,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "-mthumb",
@@ -469,7 +470,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv8m-cros-win-gnu"
diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_maincc_target_specific.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_maincc_target_specific.json
index 69af166..2758038 100644
--- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_maincc_target_specific.json
+++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_maincc_target_specific.json
@@ -27,6 +27,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -36,7 +37,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -79,6 +79,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-eabi-",
@@ -88,7 +89,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -131,6 +131,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-win-gnu-",
@@ -140,7 +141,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -183,6 +183,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "-mthumb",
@@ -193,7 +194,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv7m-cros-linux-gnu"
@@ -235,6 +235,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/armv7m-cros-eabi-",
@@ -244,7 +245,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv7m-cros-eabi"
@@ -286,6 +286,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "-mthumb",
@@ -296,7 +297,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv7m-cros-win-gnu"
@@ -338,6 +338,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "-mthumb",
@@ -348,7 +349,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv8m-cros-linux-gnu"
@@ -390,6 +390,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/armv8m-cros-eabi-",
@@ -399,7 +400,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv8m-cros-eabi"
@@ -441,6 +441,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "-mthumb",
@@ -451,7 +452,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv8m-cros-win-gnu"
diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_path.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_path.json
index afc7951..0d5ce1f 100644
--- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_path.json
+++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_path.json
@@ -27,6 +27,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -36,7 +37,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -82,6 +82,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -91,7 +92,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -137,6 +137,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -146,7 +147,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -192,6 +192,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -201,7 +202,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -254,6 +254,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -265,7 +266,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -321,6 +321,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -332,7 +333,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -383,6 +383,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -394,7 +395,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -440,6 +440,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -449,7 +450,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -492,6 +492,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=a/b/c/d/e/bin/x86_64-cros-linux-gnu-",
@@ -501,7 +502,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-Ba/b/c/d/e/bin",
             "-target",
@@ -544,6 +544,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=a/b/c/d/e/bin/x86_64-cros-linux-gnu-",
@@ -553,7 +554,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-Ba/b/c/d/e/bin",
             "-target",
@@ -596,6 +596,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../bin/x86_64-cros-linux-gnu-",
@@ -605,7 +606,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../bin",
             "-target",
@@ -651,6 +651,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../bin/x86_64-cros-linux-gnu-",
@@ -660,7 +661,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json
index 3e140d5..36e1d38 100644
--- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json
+++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sanitizer_args.json
@@ -29,6 +29,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -39,7 +40,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -84,6 +84,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -94,7 +95,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -139,6 +139,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -149,7 +150,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -194,6 +194,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -204,7 +205,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -248,6 +248,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -258,7 +259,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -303,6 +303,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -314,7 +315,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -358,6 +358,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -368,7 +369,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -412,6 +412,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -422,7 +423,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_specific_args.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_specific_args.json
index fbe038e..b867b42 100644
--- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_specific_args.json
+++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_specific_args.json
@@ -37,6 +37,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -54,7 +55,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -98,6 +98,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -108,7 +109,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -152,6 +152,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -162,7 +163,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -206,6 +206,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -216,7 +217,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sysroot_wrapper_common.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sysroot_wrapper_common.json
index f2ccadb..595634b 100644
--- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sysroot_wrapper_common.json
+++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_sysroot_wrapper_common.json
@@ -60,6 +60,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -69,7 +70,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -115,6 +115,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -124,7 +125,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -163,6 +163,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -172,7 +173,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -216,6 +216,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "-fno-stack-protector",
@@ -227,7 +228,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -271,6 +271,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "-mthumb",
@@ -283,7 +284,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-B../../bin",
             "-target",
             "armv7a-cros-linux-gnueabihf"
@@ -325,6 +325,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -335,7 +336,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clangtidy.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clangtidy.json
index dc641c9..8a9edab 100644
--- a/compiler_wrapper/testdata/cros_nonhardened_golden/clangtidy.json
+++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clangtidy.json
@@ -42,6 +42,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -51,7 +52,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -75,6 +75,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -84,7 +85,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -138,6 +138,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -147,7 +148,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -172,6 +172,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -181,7 +182,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -237,6 +237,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -246,7 +247,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -274,6 +274,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -283,7 +284,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -340,6 +340,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -349,7 +350,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -374,6 +374,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -383,7 +384,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/force_disable_werror.json b/compiler_wrapper/testdata/cros_nonhardened_golden/force_disable_werror.json
index 54b994c..1a2bbd4 100644
--- a/compiler_wrapper/testdata/cros_nonhardened_golden/force_disable_werror.json
+++ b/compiler_wrapper/testdata/cros_nonhardened_golden/force_disable_werror.json
@@ -30,6 +30,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -39,7 +40,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -85,6 +85,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -94,7 +95,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -126,6 +126,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -135,7 +136,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -185,6 +185,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -194,7 +195,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -226,6 +226,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -235,7 +236,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_clang_syntax.json b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_clang_syntax.json
index 5234715..bfd3e66 100644
--- a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_clang_syntax.json
+++ b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_clang_syntax.json
@@ -27,6 +27,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -36,7 +37,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -101,6 +101,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -110,7 +111,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -170,6 +170,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -179,7 +180,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",
@@ -225,6 +225,7 @@
             "-fexperimental-new-pass-manager",
             "-Wno-compound-token-split-by-macro",
             "-Wno-deprecated-declarations",
+            "-Wno-error=implicit-function-declaration",
             "-fcrash-diagnostics-dir=/tmp/stable/clang_crash_diagnostics",
             "-static-libgcc",
             "--prefix=../../bin/x86_64-cros-linux-gnu-",
@@ -234,7 +235,6 @@
             "-Wno-compound-token-split-by-space",
             "-Wno-string-concatenation",
             "-Wno-deprecated-copy",
-            "-Wno-unused-but-set-variable",
             "-mno-movbe",
             "-B../../bin",
             "-target",