[all-commits] [llvm/llvm-project] ac7c8e: [NFC][analyzer] Simplify ownership of checker obje...

Donát Nagy via All-commits all-commits at lists.llvm.org
Thu Feb 27 09:34:12 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ac7c8eb4de0b0f8f9e01df3a12e9a7f7f20899e9
      https://github.com/llvm/llvm-project/commit/ac7c8eb4de0b0f8f9e01df3a12e9a7f7f20899e9
  Author: Donát Nagy <donat.nagy at ericsson.com>
  Date:   2025-02-27 (Thu, 27 Feb 2025)

  Changed paths:
    M clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
    M clang/lib/StaticAnalyzer/Frontend/CreateCheckerManager.cpp

  Log Message:
  -----------
  [NFC][analyzer] Simplify ownership of checker objects (#128887)

Previously checker objects were created by raw `new` calls, which
necessitated managing and calling their destructors explicitly. This
commit refactors this convoluted logic by introducing `unique_ptr`s that
to manage the ownership of these objects automatically.

This change can be thought of as stand-alone code quality improvement;
but I also have a secondary motivation that I'm planning further changes
in the checker registration/initialization process (to formalize our
tradition of multi-part checker) and this commit "prepares the ground"
for those changes.



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