Revert "Update clang version to clang-r510928"

Revert submission 2804373-clang_r510928

Bug: http://b/301328082

Reason for revert: Broke aosp-main/aosp_x86-next-userdebug

Reverted changes: /q/submissionid:2804373-clang_r510928

Change-Id: I6802b329e8dbd9dce5a75aab76c43960765a8594
diff --git a/cc/config/global.go b/cc/config/global.go
index b0f0ed2..5fed7f1 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -253,14 +253,6 @@
 		// http://b/161386391 for -Wno-pointer-to-int-cast
 		"-Wno-pointer-to-int-cast",
 		"-Werror=fortify-source",
-		// http://b/315246135 temporarily disabled
-		"-Wno-error=unused-variable",
-		// http://b/315250603 temporarily disabled
-		"-Wno-error=format",
-		// Disabled because it produces many false positives. http://b/323050926
-		"-Wno-missing-field-initializers",
-		// http://b/323050889
-		"-Wno-packed-non-pod",
 
 		"-Werror=address-of-temporary",
 		"-Werror=incompatible-function-pointer-types",
@@ -339,8 +331,6 @@
 
 		"-Wno-unused",
 		"-Wno-deprecated",
-		"-Wno-tautological-negation-compare",
-		"-Wno-tautological-undefined-compare",
 	}
 
 	// Similar to noOverrideGlobalCflags, but applies only to third-party code
@@ -366,8 +356,6 @@
 		"-Wno-unqualified-std-cast-call",
 		"-Wno-array-parameter",
 		"-Wno-gnu-offsetof-extensions",
-		// TODO: Enable this warning http://b/315245071
-		"-Wno-fortify-source",
 	}
 
 	llvmNextExtraCommonGlobalCflags = []string{
@@ -387,8 +375,8 @@
 
 	// prebuilts/clang default settings.
 	ClangDefaultBase         = "prebuilts/clang/host"
-	ClangDefaultVersion      = "clang-r510928"
-	ClangDefaultShortVersion = "18"
+	ClangDefaultVersion      = "clang-r498229b"
+	ClangDefaultShortVersion = "17"
 
 	// Directories with warnings from Android.bp files.
 	WarningAllowedProjects = []string{