3 Commits

Author SHA1 Message Date
Ryosuke Niwa
a34e89fcb5
[alpha.webkit.NoDeleteChecker] Don't emit a warning for a function without annotation. (#178824)
This PR fixes the bug in alpha.webkit.NoDeleteChecker that it emits a
warning for any function without
[[clang::annotate_type("webkit.nodelete")]] annotation if it contains
non-trivial code. It also fixes a bug hat we weren't checking the
presence of the annotation on superclass' corresponding member
functions.
2026-01-30 19:31:24 -08:00
Ryosuke Niwa
68695090cc
[alpha.webkit.NoDeleteChecker] Fix a nullptr deference crash during lookupInBases (#178351)
Added a null check in the lambda passed to lookupInBases.
2026-01-28 09:05:44 -08:00
Ryosuke Niwa
2158b83f61
Add nodelete annotation for WebKit checkers with a new checker for validation (#177839)
This PR adds the support for specifying
`[[clang::annotate_type("webkit.nodelete")]]` on a function return type,
in which case, the whole function is considered "trivial" or more
precisely that it does not trigger any destruction of an object.

This PR also introduces alpha.webkit.NoDeleteChecker which validates
soundness of the annotation by examining the function body. The checker
will warn if `[[clang::annotate_type("webkit.nodelete")]]` is specified
on a function with a body which does not pass the triviality test.

---------

Co-authored-by: Balazs Benics <benicsbalazs@gmail.com>
2026-01-27 09:18:45 -08:00