[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang-tools-extra / docs / clang-tidy / checks / hicpp / undelegated-constructor.rst
blobf67ca65f5cafa8116e7857382e0afaf78fcd0493
1 .. title:: clang-tidy - hicpp-undelegated-constructor
2 .. meta::
3    :http-equiv=refresh: 5;URL=../bugprone/undelegated-constructor.html
5 hicpp-undelegated-constructor
6 =============================
8 This check is an alias for :doc:`bugprone-undelegated-constructor <../bugprone/undelegated-constructor>`.
9 Partially implements `rule 12.4.5 <https://www.perforce.com/resources/qac/high-integrity-cpp-coding-standard/special-member-functions>`_
10 to find misplaced constructor calls inside a constructor.
12 .. code-block:: c++
14   struct Ctor {
15     Ctor();
16     Ctor(int);
17     Ctor(int, int);
18     Ctor(Ctor *i) {
19       // All Ctor() calls result in a temporary object
20       Ctor(); // did you intend to call a delegated constructor?
21       Ctor(0); // did you intend to call a delegated constructor?
22       Ctor(1, 2); // did you intend to call a delegated constructor?
23       foo();
24     }
25   };