ART: Disable Wunreachable-code for tidy
Ignore false warnings.
Bug: 110359146
Test: mmma art
Change-Id: I323d5cb75f553afb61156145a807ddf81670dd6d
diff --git a/build/Android.bp b/build/Android.bp
index b7d2cbc..07410b3 100644
--- a/build/Android.bp
+++ b/build/Android.bp
@@ -161,6 +161,11 @@
// void foo() { CHECK(kIsFooEnabled); /* do foo... */ }
// not being marked noreturn if kIsFooEnabled is false.
"-extra-arg=-Wno-missing-noreturn",
+ // Because tidy doesn't like our flow checks for compile-time configuration and thinks that
+ // the following code is dead (it is, but not for all configurations), disable unreachable
+ // code detection in Clang for tidy builds. It is still on for regular build steps, so we
+ // will still get the "real" errors.
+ "-extra-arg=-Wno-unreachable-code",
// Use art_clang_tidy_errors for build errors.
"-warnings-as-errors=" + art_clang_tidy_errors_str,
],