diff options
author | Andrei Golubev <andrey.golubev@intel.com> | 2024-03-05 09:07:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-04 23:07:43 -0800 |
commit | 90e9e962e18fc4304c6aba81de2bb53069bcd358 (patch) | |
tree | dca6f029f7105b1f3c87a86533aa8db264882c6f /llvm/lib/FileCheck/FileCheck.cpp | |
parent | 9b672de9976084872fbca764898ed722dea1dd9b (diff) | |
download | llvm-90e9e962e18fc4304c6aba81de2bb53069bcd358.zip llvm-90e9e962e18fc4304c6aba81de2bb53069bcd358.tar.gz llvm-90e9e962e18fc4304c6aba81de2bb53069bcd358.tar.bz2 |
[mlir][NFC] Apply rule of five to *Pass classes (#80998)
Define all special member functions for mlir::Pass, mlir::OperationPass,
mlir::PassWrapper and PassGen types since these classes explicitly
specify copy-ctor. This, subsequently, should silence static analysis
checkers that report rule-of-3 / rule-of-5 violations.
Given the nature of the types, however, mark other special member
functions deleted: the semantics of a Pass type object seems to be that
it is only ever created by being wrapped in a smart pointer, so the
special member functions are never to be used externally (except for the
copy-ctor - it is "special" since it is a "delegating" ctor for derived
pass types to use during cloning - see https://reviews.llvm.org/D104302
for details).
Deleting other member functions means that `Pass x(std::move(y))` - that
used to silently work (via copy-ctor) - would fail to compile now. Yet,
as the copy ctors through the hierarchy are under 'protected' access,
the issue is unlikely to appear in practice.
Co-authored-by: Asya Pronina <anastasiya.pronina@intel.com>
Co-authored-by: Harald Rotuna <harald.razvan.rotuna@intel.com>
Diffstat (limited to 'llvm/lib/FileCheck/FileCheck.cpp')
0 files changed, 0 insertions, 0 deletions