[all-commits] [llvm/llvm-project] a7982d: [analyzer] UncountedCallArgsChecker: Detect & igno...
Ryosuke Niwa via All-commits
all-commits at lists.llvm.org
Wed Feb 14 18:46:42 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a7982d5e7a16f681e80891a819bdf14dde928755
https://github.com/llvm/llvm-project/commit/a7982d5e7a16f681e80891a819bdf14dde928755
Author: Ryosuke Niwa <rniwa at webkit.org>
Date: 2024-02-14 (Wed, 14 Feb 2024)
Changed paths:
M clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
M clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp
M clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h
M clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedCallArgsChecker.cpp
M clang/test/Analysis/Checkers/WebKit/call-args.cpp
M clang/test/Analysis/Checkers/WebKit/uncounted-obj-arg.cpp
Log Message:
-----------
[analyzer] UncountedCallArgsChecker: Detect & ignore trivial function calls. (#81808)
This PR introduces the concept of a "trivial function" which applies to
a function that only calls other trivial functions and contain literals
and expressions that don't result in heap mutations (specifically it
does not call deref). This is implemented using ConstStmtVisitor and
checking each statement and expression's trivialness.
This PR also introduces the concept of a "ingleton function", which is a
static member function or a free standing function which ends with the
suffix "singleton". Such a function's return value is understood to be
safe to call any function with.
More information about the All-commits
mailing list