12 Commits

Author SHA1 Message Date
Austin Jiang
e6cdfb75ac
Fix typos and spelling errors across codebase (#156270)
Corrected various spelling mistakes such as 'occurred', 'receiver',
'initialized', 'length', and others in comments, variable names,
function names, and documentation throughout the project. These
changes improve code readability and maintain consistency in naming
and documentation.

Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
2026-01-13 11:52:46 -05:00
Ryosuke Niwa
5f6a5e02cd
[alpha.webkit.ForwardDeclChecker] Add a missing nullptr check (#171740) 2025-12-12 11:39:26 -08:00
Ryosuke Niwa
aca48a44d1
Add the support for recognizing WTF::move like std::move (#170820)
This PR adds support for treating WTF::move like std::move in various
WebKit checkers.
2025-12-10 11:04:48 -08:00
Ryosuke Niwa
e61e6251b6
[alpha.webkit.ForwardDeclChecker] Ignore unary operator when detecting a parameter (#160994)
This PR updates the forward declaration checker so that unary operator &
and * will be ignored for the purpose of determining if a given function
argument is also a function argument of the caller / call-site.
2025-10-15 15:28:58 -07:00
Ryosuke Niwa
9d933c794a
[WebKit checkers] Add the support for OSObjectPtr (#159484)
Add the support for OSObjectPtr, which behaves like RetainPtr.
2025-09-18 21:46:22 -07:00
Ryosuke Niwa
db74eae1dc
[WebKit checkers] Treat NULL, 0, and nil like nullptr (#157700)
This PR makes WebKit checkers treat NULL, 0, and nil like nullptr in
various places.
2025-09-10 16:04:03 -07:00
Kazu Hirata
8d49c64fa2
[StaticAnalyzer] Remove unused includes (NFC) (#141525)
These are identified by misc-include-cleaner.  I've filtered out those
that break builds.  Also, I'm staying away from llvm-config.h,
config.h, and Compiler.h, which likely cause platform- or
compiler-specific build failures.
2025-05-26 14:57:13 -07:00
Ryosuke Niwa
6136019780
[alpha.webkit.ForwardDeclChecker] Recognize a forward declared template specialization (#134545)
This PR fixes a bug that when a template specialization is declared with
a forward declaration of a template, the checker fails to find its
definition in the same translation unit and erroneously emit an unsafe
forward declaration warning.
2025-04-10 15:28:36 -07:00
Aaron Ballman
6defc8ee66 Initialize member variable; NFC
This was found via a Coverity static analysis pass. There's no
indication this was being used incorrectly in practice, but there are
public interfaces which require `BR` to be non-null and valid, and `BR`
was not being initialized by the constructor.

This adds an in-class initializer for `BR` and some asserts, to be safe.
2025-04-10 08:28:52 -04:00
Ryosuke Niwa
d8fd665960
[alpha.webkit.ForwardDeclChecker] Ignore forward declared struct. (#133804)
There are some system libraries such as sqlite3 which forward declare a
struct then use a pointer to that forward declared type in various APIs.
Ignore these types ForwardDeclChecker like other pointer types.
2025-04-04 12:04:20 -07:00
Ryosuke Niwa
2e3c317790
Fix the assertion failure in Analysis/Checkers/WebKit/forward-decl-checker.mm after https://github.com/llvm/llvm-project/pull/132784. (#133341) 2025-03-27 16:45:47 -07:00
Ryosuke Niwa
4dcba5e08d
[alpha.webkit.ForwardDeclChecker] Add a new WebKit checker for forward declarations (#130554)
Add a new static analyzer which emits warnings for function call
arguments, local variables, and member variables that are only forward
declared. These forward declaration prevents other WebKit checkers from
checking the safety of code.
2025-03-12 20:21:22 -07:00