Skip to content

Commit 06546e0

Browse files
carlosgalvezpCarlos Gálvez
andauthored
[clang][NFC] Fix typo 'initializeation' (llvm#131594)
Co-authored-by: Carlos Gálvez <[email protected]>
1 parent 17b4be8 commit 06546e0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6214,7 +6214,7 @@ def warn_possible_object_duplication_mutable : Warning<
62146214
"it is mutable, has hidden visibility, and external linkage">,
62156215
InGroup<UniqueObjectDuplication>, DefaultIgnore;
62166216
def warn_possible_object_duplication_init : Warning<
6217-
"initializeation of %0 may run twice when built into a shared library: "
6217+
"initialization of %0 may run twice when built into a shared library: "
62186218
"it has hidden visibility and external linkage">,
62196219
InGroup<UniqueObjectDuplication>, DefaultIgnore;
62206220

clang/test/SemaCXX/unique_object_duplication.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ inline void has_static_locals_external() {
1919
// Mutable
2020
static int disallowedStatic1 = 0; // hidden-warning {{'disallowedStatic1' may be duplicated when built into a shared library: it is mutable, has hidden visibility, and external linkage}}
2121
// Initialization might run more than once
22-
static const double disallowedStatic2 = disallowedStatic1++; // hidden-warning {{initializeation of 'disallowedStatic2' may run twice when built into a shared library: it has hidden visibility and external linkage}}
22+
static const double disallowedStatic2 = disallowedStatic1++; // hidden-warning {{initialization of 'disallowedStatic2' may run twice when built into a shared library: it has hidden visibility and external linkage}}
2323

2424
// OK, because immutable and compile-time-initialized
2525
static constexpr int allowedStatic1 = 0;
@@ -112,7 +112,7 @@ namespace GlobalTest {
112112
inline float disallowedGlobal1 = 3.14; // hidden-warning {{'disallowedGlobal1' may be duplicated when built into a shared library: it is mutable, has hidden visibility, and external linkage}}
113113

114114
// Initialization might run more than once
115-
inline const double disallowedGlobal5 = disallowedGlobal1++; // hidden-warning {{initializeation of 'disallowedGlobal5' may run twice when built into a shared library: it has hidden visibility and external linkage}}
115+
inline const double disallowedGlobal5 = disallowedGlobal1++; // hidden-warning {{initialization of 'disallowedGlobal5' may run twice when built into a shared library: it has hidden visibility and external linkage}}
116116

117117
// OK because internal linkage, so duplication is intended
118118
static float allowedGlobal1 = 3.14;
@@ -178,4 +178,4 @@ inline int allowedTemplate2 = 0;
178178

179179
template int allowedTemplate2<int>;
180180

181-
} // namespace TemplateTest
181+
} // namespace TemplateTest

0 commit comments

Comments
 (0)