Suppress tidy checks that block migration to gnu11
The clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling
check gave more warnings in gnu11 mode and they are not suitable
for Android. This check is disabled in AOSP global default, and
local projects should not enable it or should change source code
to avoid those warnings.
Use tidy_checks_as_errors instead of tidy_flags to specify
the checks to be treated as errors.
Bug: 227361697
Test: make with global default set to gnu11
Change-Id: I09f7aa562ab51d3f536cd48184d430212d67b51b
diff --git a/Android.bp b/Android.bp
index 7a8ba03..982e656 100644
--- a/Android.bp
+++ b/Android.bp
@@ -77,10 +77,16 @@
"-*",
"cert-*",
"clang-analyzer-security*",
+ // b/2043314, warnings on memcpy_s, memset_s, snprintf_s calls
+ // are blocking the migration from gnu99 to gnu11.
+ // Until those warnings are fixed, disable these checks.
+ "-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling",
"android-*",
],
- tidy_flags: [
- "-warnings-as-errors=clang-analyzer-security*,cert-*,android-*",
+ tidy_checks_as_errors: [
+ "clang-analyzer-security*",
+ "cert-*",
+ "android-*",
],
sanitize: {
memtag_heap: true,