Skip to content

Commit 5339ef1

Browse files
committed
[ODRHash diagnostics] Fix typos. NFC.
(cherry picked from commit 3514131)
1 parent 3e23d22 commit 5339ef1

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

clang/include/clang/Basic/DiagnosticSerializationKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def err_module_odr_violation_enum : Error<
355355
"enum with specified type %4|"
356356
"enum with %4 element%s4|"
357357
"%ordinal4 element has name %5|"
358-
"%ordinal4 element %5 %select{has|does not have}6 an initilizer|"
358+
"%ordinal4 element %5 %select{has|does not have}6 an initializer|"
359359
"%ordinal4 element %5 has an initializer|"
360360
"}3">;
361361

clang/lib/Serialization/ASTReader.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10588,7 +10588,7 @@ void ASTReader::diagnoseOdrViolations() {
1058810588

1058910589
// Compare the hash generated to the hash stored. A difference means
1059010590
// that a body was present in the original source. Due to merging,
10591-
// the stardard way of detecting a body will not work.
10591+
// the standard way of detecting a body will not work.
1059210592
const bool HasFirstBody =
1059310593
ComputeCXXMethodODRHash(FirstMethod) != FirstMethod->getODRHash();
1059410594
const bool HasSecondBody =
@@ -11118,8 +11118,8 @@ void ASTReader::diagnoseOdrViolations() {
1111811118
DifferentSpecifiedTypes,
1111911119
DifferentNumberEnumConstants,
1112011120
EnumConstantName,
11121-
EnumConstantSingleInitilizer,
11122-
EnumConstantDifferentInitilizer,
11121+
EnumConstantSingleInitializer,
11122+
EnumConstantDifferentInitializer,
1112311123
};
1112411124

1112511125
// If we've already pointed out a specific problem with this enum, don't
@@ -11253,18 +11253,18 @@ void ASTReader::diagnoseOdrViolations() {
1125311253
continue;
1125411254

1125511255
if (!FirstInit || !SecondInit) {
11256-
ODRDiagError(FirstEnumConstant, EnumConstantSingleInitilizer)
11256+
ODRDiagError(FirstEnumConstant, EnumConstantSingleInitializer)
1125711257
<< I + 1 << FirstEnumConstant << (FirstInit != nullptr);
11258-
ODRDiagNote(SecondEnumConstant, EnumConstantSingleInitilizer)
11258+
ODRDiagNote(SecondEnumConstant, EnumConstantSingleInitializer)
1125911259
<< I + 1 << SecondEnumConstant << (SecondInit != nullptr);
1126011260
Diagnosed = true;
1126111261
break;
1126211262
}
1126311263

1126411264
if (ComputeODRHash(FirstInit) != ComputeODRHash(SecondInit)) {
11265-
ODRDiagError(FirstEnumConstant, EnumConstantDifferentInitilizer)
11265+
ODRDiagError(FirstEnumConstant, EnumConstantDifferentInitializer)
1126611266
<< I + 1 << FirstEnumConstant;
11267-
ODRDiagNote(SecondEnumConstant, EnumConstantDifferentInitilizer)
11267+
ODRDiagNote(SecondEnumConstant, EnumConstantDifferentInitializer)
1126811268
<< I + 1 << SecondEnumConstant;
1126911269
Diagnosed = true;
1127011270
break;

clang/test/Modules/odr_hash.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3300,7 +3300,7 @@ enum E7 { x71 = 0 };
33003300
enum E7 { x71 };
33013301
#else
33023302
E7 e7;
3303-
// [email protected]:* {{'Enums::E7' has different definitions in different modules; definition in module 'SecondModule' first difference is 1st element 'x71' has an initilizer}}
3303+
// [email protected]:* {{'Enums::E7' has different definitions in different modules; definition in module 'SecondModule' first difference is 1st element 'x71' has an initializer}}
33043304
// [email protected]:* {{but in 'FirstModule' found 1st element 'x71' does not have an initializer}}
33053305
#endif
33063306

@@ -3310,7 +3310,7 @@ enum E8 { x81 };
33103310
enum E8 { x81 = 0 };
33113311
#else
33123312
E8 e8;
3313-
// [email protected]:* {{'Enums::E8' has different definitions in different modules; definition in module 'SecondModule' first difference is 1st element 'x81' does not have an initilizer}}
3313+
// [email protected]:* {{'Enums::E8' has different definitions in different modules; definition in module 'SecondModule' first difference is 1st element 'x81' does not have an initializer}}
33143314
// [email protected]:* {{but in 'FirstModule' found 1st element 'x81' has an initializer}}
33153315
#endif
33163316

0 commit comments

Comments
 (0)