[all-commits] [llvm/llvm-project] 03adb0: [analyzer] Remove deprecated option VirtualCall:Pu...

Donát Nagy via All-commits all-commits at lists.llvm.org
Wed Mar 19 10:22:22 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 03adb0ec7dce36814b9e403e98e7471630c4a732
      https://github.com/llvm/llvm-project/commit/03adb0ec7dce36814b9e403e98e7471630c4a732
  Author: Donát Nagy <donat.nagy at ericsson.com>
  Date:   2025-03-19 (Wed, 19 Mar 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
    M clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
    M clang/test/Analysis/analyzer-config.c
    M clang/test/Analysis/virtualcall.cpp

  Log Message:
  -----------
  [analyzer] Remove deprecated option VirtualCall:PureOnly (#131823)

VirtualCallChecker.cpp implements two related checkers:
- `optin.cplusplus.VirtualCall` which reports situations when
constructors or destructors call virtual methods (which is bugprone
because it does not trigger virtual dispatch, but can be legitmate).
- `cplusplus.PureVirtualCall` reports situations when constructors or
destructors call _pure_ virtual methods, which is an error.

Six years ago these two bug types were both reported by the same checker
(called `optin.cplusplus.VirtualCall`) and it had an option called
`PureOnly` which limited its output to the pure case.

When (in 2019) the two checker parts were separated by the commit
d3971fe97b64785c079d64bf4c8c3e2b5e1f85a1, the option `PureOnly` was
preserved for the sake of compatibility, but it is no longer useful
(when it is set to true, it just suppresses all reports from
`optin.cplusplus.VirtualCall`) so it was marked as deprecated.

I'm removing this deprecated option now because it is no longer relevant
and its presence caused minor complications when I was porting
`VirtualCallChecker.cpp` to the new multipart checker framework
(introduced in 27099982da2f5a6c2d282d6b385e79d080669546).



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