[all-commits] [llvm/llvm-project] cec350: [alpha.webkit.UnretainedLocalVarsChecker] Add a ch...

Ryosuke Niwa via All-commits all-commits at lists.llvm.org
Mon Feb 24 12:14:36 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cec35077025da73bd2d8bf78d5bb62c43f3ccd0a
      https://github.com/llvm/llvm-project/commit/cec35077025da73bd2d8bf78d5bb62c43f3ccd0a
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2025-02-24 (Mon, 24 Feb 2025)

  Changed paths:
    M clang/docs/analyzer/checkers.rst
    M clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
    M clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
    M clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.h
    M clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp
    M clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h
    M clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefCallArgsChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefLocalVarsChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp
    A clang/test/Analysis/Checkers/WebKit/objc-mock-types.h
    A clang/test/Analysis/Checkers/WebKit/unretained-local-vars-arc.mm
    A clang/test/Analysis/Checkers/WebKit/unretained-local-vars.mm

  Log Message:
  -----------
  [alpha.webkit.UnretainedLocalVarsChecker] Add a checker for local variables to NS and CF types. (#127554)

This PR adds alpha.webkit.UnretainedLocalVarsChecker by generalizing
RawPtrRefLocalVarsChecker. It checks local variables to NS or CF types
are guarded with a RetainPtr or not. The new checker is effective for NS
and CF types in Objective-C++ code without ARC, and it's effective for
CF types in code with ARC.



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