[webkit-dev] Smart Pointer Analysis Tool for WebKit
Darin Adler
darin at apple.com
Wed Sep 23 10:42:18 PDT 2020
> On Sep 23, 2020, at 10:32 AM, Darin Adler <darin at apple.com> wrote:
>
>> On Sep 16, 2020, at 11:32 PM, Ryosuke Niwa <rniwa at webkit.org <mailto:rniwa at webkit.org>> wrote:
>> Every data member to a ref counted object must use either Ref, RefPtr, or WeakPtr. webkit.NoUncountedMemberChecker <https://github.com/llvm/llvm-project/blob/master/clang/docs/analyzer/checkers.rst#id17>My only worry here is performance. Do we know yet if we can afford it?
>
> The worst case here is Ref, which is much worse than a reference since we end up having to use -> instead of . everywhere and you can’t see that there is no null involved.
I don’t mean performance worst case. I meant “outside of performance concerns, the worst downgrade of our programming idioms is Ref”.
>> Every ref counted base class, if it has a derived class, must define a virtual destructor. webkit.RefCntblBaseVirtualDtor <https://github.com/llvm/llvm-project/blob/master/clang/docs/analyzer/checkers.rst#id16>The style system has an optimization that intentionally violates this for performance reasons (StyleRuleBase).
So are we saying we must not do that optimization, or will we have a way to suppress the warning for this?
— Darin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20200923/39783b70/attachment.htm>
More information about the webkit-dev
mailing list