OSDN Git Service

[sanitizer][Darwin] Suppress -Wno-non-virtual-dtor warning
authorJulian Lettner <julian.lettner@apple.com>
Wed, 6 Jan 2021 00:09:46 +0000 (16:09 -0800)
committerJulian Lettner <julian.lettner@apple.com>
Wed, 6 Jan 2021 01:09:18 +0000 (17:09 -0800)
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

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

index aa29536..ed10fcc 100644 (file)
@@ -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