Fix weak vtable warnings

Move virtual destructors into cpp file so that the compiler knows which
translation unit to put the vtable into.  Hide the warning for
DeathRecipient, which has no virtual methods to move.  The warnings were
being hidden by the use of -isystem to include
frameworks/native/include.

Bug: 31752268
Test: m -j
Change-Id: I25329d66bfc1f6a5064d05ce7d12ad9b090601f8
diff --git a/include/binder/IBinder.h b/include/binder/IBinder.h
index 5f1e87c..9097cb3 100644
--- a/include/binder/IBinder.h
+++ b/include/binder/IBinder.h
@@ -90,12 +90,24 @@
                                         Parcel* reply,
                                         uint32_t flags = 0) = 0;
 
+    // DeathRecipient is pure abstract, there is no virtual method
+    // implementation to put in a translation unit in order to silence the
+    // weak vtables warning.
+    #if defined(__clang__)
+    #pragma clang diagnostic push
+    #pragma clang diagnostic ignored "-Wweak-vtables"
+    #endif
+
     class DeathRecipient : public virtual RefBase
     {
     public:
         virtual void binderDied(const wp<IBinder>& who) = 0;
     };
 
+    #if defined(__clang__)
+    #pragma clang diagnostic pop
+    #endif
+
     /**
      * Register the @a recipient for a notification if this binder
      * goes away.  If this binder object unexpectedly goes away