Switch to clang r433403
Bug: 197230471
Test: presubmit
Change-Id: I374a66deb785bae99953ea23c67f873f33c2081b
diff --git a/cc/config/global.go b/cc/config/global.go
index 9773345..5f41f9e 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -230,6 +230,9 @@
"-Wno-string-concatenation", // http://b/175068488
// New warnings to be fixed after clang-r428724
"-Wno-align-mismatch", // http://b/193679946
+ // New warnings to be fixed after clang-r433403
+ "-Wno-error=unused-but-set-variable", // http://b/197240255
+ "-Wno-error=unused-but-set-parameter", // http://b/197240255
}
// Extra cflags for external third-party projects to disable warnings that
@@ -255,6 +258,9 @@
// http://b/165945989
"-Wno-psabi",
+
+ // http://b/199369603
+ "-Wno-null-pointer-subtraction",
}
IllegalFlags = []string{
@@ -268,8 +274,8 @@
// prebuilts/clang default settings.
ClangDefaultBase = "prebuilts/clang/host"
- ClangDefaultVersion = "clang-r428724"
- ClangDefaultShortVersion = "13.0.1"
+ ClangDefaultVersion = "clang-r433403"
+ ClangDefaultShortVersion = "13.0.2"
// Directories with warnings from Android.bp files.
WarningAllowedProjects = []string{
diff --git a/cc/tidy.go b/cc/tidy.go
index fefa7f0..53ff156 100644
--- a/cc/tidy.go
+++ b/cc/tidy.go
@@ -148,6 +148,9 @@
tidyChecks = tidyChecks + ",-bugprone-branch-clone"
// http://b/193716442
tidyChecks = tidyChecks + ",-bugprone-implicit-widening-of-multiplication-result"
+ // Too many existing functions trigger this rule, and fixing it requires large code
+ // refactoring. The cost of maintaining this tidy rule outweighs the benefit it brings.
+ tidyChecks = tidyChecks + ",-bugprone-easily-swappable-parameters"
flags.TidyFlags = append(flags.TidyFlags, tidyChecks)
if ctx.Config().IsEnvTrue("WITH_TIDY") {