Disable/allow some clang-tidy and clang warnings

* Disable bugprone-unchecked-optional-access because it
  crashed with some Android files.
* Allow misc-const-correctness and bugprone-assignment-in-if-condition
  as warnings, not to stop build as errors.
  Disable them in the global default check list.
* Allow/show clang deprecated* and array-parameter warnings for the NEXT version.

Bug: 241125373
Bug: 241819232
Bug: 241941550
Bug: 241601211
Bug: 241997913
Test: presubmit
Change-Id: Ifdc7a63c4e349b1ace4880bd002d14dc41054dcf
This commit is contained in:
Chih-Hung Hsieh
2022-08-08 22:40:50 -07:00
parent 8c9a3f2596
commit 3b93ac6784
2 changed files with 15 additions and 3 deletions

View File

@@ -290,7 +290,11 @@ var (
"-Wno-deprecated-non-prototype",
}
llvmNextExtraCommonGlobalCflags = []string{}
llvmNextExtraCommonGlobalCflags = []string{
"-Wno-error=array-parameter", // http://b/241941550
"-Wno-error=deprecated-builtins", // http://b/241601211
"-Wno-error=deprecated", // in external/googletest/googletest
}
IllegalFlags = []string{
"-w",