[llvm-branch-commits] [compiler-rt] 8b0bd54 - [sanitizer][Darwin] Suppress -Wno-non-virtual-dtor warning

Julian Lettner via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jan 5 17:15:49 PST 2021


Author: Julian Lettner
Date: 2021-01-05T17:09:18-08:00
New Revision: 8b0bd54d0ec968df28ccc58bbb537a7b7c074ef2

URL: https://github.com/llvm/llvm-project/commit/8b0bd54d0ec968df28ccc58bbb537a7b7c074ef2
DIFF: https://github.com/llvm/llvm-project/commit/8b0bd54d0ec968df28ccc58bbb537a7b7c074ef2.diff

LOG: [sanitizer][Darwin] Suppress -Wno-non-virtual-dtor warning

Suppress the warning:
```
'fake_shared_weak_count' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor]
```

The warning has been recently enabled [1], but the associated cleanup
missed this instance in Darwin code [2].

[1] 9c31e12609e1935eb84a2497ac08a49e3139859a
[2] d48f2d7c02743571075bb7812bb4c9e634e51ed1

Differential Revision: https://reviews.llvm.org/D94139

Added: 
    

Modified: 
    compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp b/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp
index aa29536d8616..ed10fccc980a 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp
@@ -438,6 +438,7 @@ struct fake_shared_weak_count {
   virtual void on_zero_shared() = 0;
   virtual void _unused_0x18() = 0;
   virtual void on_zero_shared_weak() = 0;
+  virtual ~fake_shared_weak_count() = 0;  // suppress -Wnon-virtual-dtor
 };
 }  // namespace
 


        


More information about the llvm-branch-commits mailing list