[all-commits] [llvm/llvm-project] 188fb9: [WebKit Checkers] Trivial analysis should check de...
Ryosuke Niwa via All-commits
all-commits at lists.llvm.org
Wed Feb 18 11:20:04 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 188fb93581bb15c7ae41e2cb33dd6b0e0d58a50e
https://github.com/llvm/llvm-project/commit/188fb93581bb15c7ae41e2cb33dd6b0e0d58a50e
Author: Ryosuke Niwa <rniwa at webkit.org>
Date: 2026-02-18 (Wed, 18 Feb 2026)
Changed paths:
M clang/lib/StaticAnalyzer/Checkers/WebKit/NoDeleteChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp
M clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h
M clang/test/Analysis/Checkers/WebKit/mock-types.h
M clang/test/Analysis/Checkers/WebKit/nodelete-annotation.cpp
M clang/test/Analysis/Checkers/WebKit/uncounted-local-vars.cpp
Log Message:
-----------
[WebKit Checkers] Trivial analysis should check destructors of function parameters and local variables (#181576)
This PR fixes the bug in TrivialFunctionAnalysisVisitor that it wasn't
checking the triviality of destructors of function parameters and local
variables. This meant that code calls a non-trivial desturctors such as
RefPtr<T>::~RefPtr<T> which calls T::~T to be incorrectly treated as
trivial, resulting in false negatives.
To do this, we manually visit every function parameter and local
variable declaration and check the triviality of its destructor
recursively.
Also fix a bug that we were checking isVirtualAsWritten instead of
isVirtual in IsFunctionTrivial.
---------
Co-authored-by: Balazs Benics <benicsbalazs at gmail.com>
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