Discard IllegalFlags when testing a new compiler

Also add -Wno-everything as suggested by Pirama

Bug: b/308179696

Follow up: https://b.corp.google.com/issues/308179380

Change-Id: Iaa73f2b52363562b2391346d8b2e5dc73bab4f2d
diff --git a/cc/config/global.go b/cc/config/global.go
index 62b008b..a72dedc 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -345,7 +345,7 @@
 
 	llvmNextExtraCommonGlobalCflags = []string{
 		// Do not report warnings when testing with the top of trunk LLVM.
-		"-Wno-error",
+		"-Wno-everything",
 	}
 
 	// Flags that must not appear in any command line.
@@ -461,6 +461,7 @@
 		flags := noOverrideGlobalCflags
 		if ctx.Config().IsEnvTrue("LLVM_NEXT") {
 			flags = append(noOverrideGlobalCflags, llvmNextExtraCommonGlobalCflags...)
+			IllegalFlags = []string{} // Don't fail build while testing a new compiler.
 		}
 		return strings.Join(flags, " ")
 	})