xref: /llvm-project/clang-tools-extra/docs/clang-tidy/checks/performance/trivially-destructible.rst (revision 6e566bc5523f743bc34a7e26f050f1f2b4d699a8)
1.. title:: clang-tidy - performance-trivially-destructible
2
3performance-trivially-destructible
4==================================
5
6Finds types that could be made trivially-destructible by removing out-of-line
7defaulted destructor declarations.
8
9.. code-block:: c++
10
11   struct A: TrivialType {
12     ~A(); // Makes A non-trivially-destructible.
13     TrivialType trivial_fields;
14   };
15   A::~A() = default;
16