Skip to content

Commit 95e823e

Browse files
authored
[clang-tidy]: Use correct term for user-provided constructor (llvm#96617)
First of all, fix a confusion in the documentation for pro-type-member-init which used the wrong term for a user-provided constructor. (In the corresponding comment in ProTypeMemberInitCheck.h, which was added in the same commit that added this documentation, we already use the correct term). Second, also fix a comment in the corresponding test that had the same mistake. https://timsong-cpp.github.io/cppwp/std23/dcl.fct.def.default#5: > A function is user-provided if it is user-declared and not explicitly > defaulted or deleted on its first declaration. ("user-defined constructor" is not a thing in the standard)
1 parent 2c1fb41 commit 95e823e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/pro-type-member-init.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
cppcoreguidelines-pro-type-member-init
44
======================================
55

6-
The check flags user-defined constructor definitions that do not
6+
The check flags user-provided constructor definitions that do not
77
initialize all fields that would be left in an undefined state by
88
default construction, e.g. builtins, pointers and record types without
99
user-provided default constructors containing at least one such

clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ struct PositiveUninitializedBaseOrdering : public NegativeAggregateType,
243243
};
244244

245245
// We shouldn't need to initialize anything because PositiveUninitializedBase
246-
// has a user-defined constructor.
246+
// has a user-provided constructor.
247247
struct NegativeUninitializedBase : public PositiveUninitializedBase {
248248
NegativeUninitializedBase() {}
249249
};

0 commit comments

Comments
 (0)