[all-commits] [llvm/llvm-project] 203a2c: [webkit.RefCntblBaseVirtualDtor] Make ThreadSafeRe...
Ryosuke Niwa via All-commits
all-commits at lists.llvm.org
Tue Sep 10 22:25:24 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 203a2ca8cd6af505e11a38aebceeaf864271042c
https://github.com/llvm/llvm-project/commit/203a2ca8cd6af505e11a38aebceeaf864271042c
Author: Ryosuke Niwa <rniwa at webkit.org>
Date: 2024-09-10 (Tue, 10 Sep 2024)
Changed paths:
M clang/lib/StaticAnalyzer/Checkers/WebKit/RefCntblBaseVirtualDtorChecker.cpp
A clang/test/Analysis/Checkers/WebKit/ref-cntbl-crtp-base-no-virtual-dtor.cpp
Log Message:
-----------
[webkit.RefCntblBaseVirtualDtor] Make ThreadSafeRefCounted not generate warnings (#107676)
This PR makes WebKit's RefCntblBaseVirtualDtor checker not generate a
warning for ThreadSafeRefCounted when the destruction thread is a
specific thread.
Prior to this PR, we only allowed CRTP classes without a virtual
destructor if its deref function had an explicit cast to the derived
type, skipping any lambda declarations which aren't invoked. This ends
up generating a warning for ThreadSafeRefCounted when a specific thread
is used to destruct the object because there is no inline body /
definition for ensureOnMainThread and ensureOnMainRunLoop and
DerefFuncDeleteExprVisitor concludes that there is no explicit delete of
the derived type.
This PR relaxes the condition DerefFuncDeleteExprVisitor checks by
allowing a delete expression to appear within a lambda declaration if
it's an argument to an "opaque" function; i.e. a function without
definition / body.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list