Workaround bogus Thread Safety Analysis warning

Building art/runtime/gc/heap.cc with thread safety analysis produces
warnings that mutator_lock_->AssertNotHeld() conflicts with
ScopedObjectAccess for holding shared and exclusive lock within the same
scope. AssertNotHeld() is a capability assertion and does not actually
hold the lock.

Thread safety analysis was broken thus the warning not appearing before
Clang r316199 update. Temporarily workaround the issue while we fix the
bug in upstream.

Bug: 71769596
Test: m checkbuild
Change-Id: I48234db966332cf24e40774cd62589359aab6d05
diff --git a/adbconnection/adbconnection.cc b/adbconnection/adbconnection.cc
index a5c885a..127792f 100644
--- a/adbconnection/adbconnection.cc
+++ b/adbconnection/adbconnection.cc
@@ -484,7 +484,10 @@
 
 void AdbConnectionState::RunPollLoop(art::Thread* self) {
   CHECK_EQ(self->GetState(), art::kNative);
-  art::Locks::mutator_lock_->AssertNotHeld(self);
+  // TODO: Clang prebuilt for r316199 produces bogus thread safety analysis warning for holding both
+  // exclusive and shared lock in the same scope. Remove the assertion as a temporary workaround.
+  // http://b/71769596
+  // art::Locks::mutator_lock_->AssertNotHeld(self);
   self->SetState(art::kWaitingInMainDebuggerLoop);
   // shutting_down_ set by StopDebuggerThreads
   while (!shutting_down_) {