[clang] [webkit.RefCntblBaseVirtualDtor] ThreadSafeRefCounted still generates warnings (PR #108656)

Artem Dergachev via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 17 14:29:09 PDT 2024


================
@@ -119,6 +119,11 @@ template<class T, DestructionThread destructionThread = DestructionThread::Any>
             ensureOnMainThread([this] {
                 delete static_cast<const T*>(this);
             });
+        } else if constexpr (destructionThread == DestructionThread::MainRunLoop) {
+            auto deleteThis = [this] {
----------------
haoNoQ wrote:

(That situation is also fun because `Function<>` can probably be overwritten, so `getInit()` may not necessarily be the correct value of the variable.)

https://github.com/llvm/llvm-project/pull/108656


More information about the cfe-commits mailing list