[clang] 3514131 - [ODRHash diagnostics] Fix typos. NFC.

Volodymyr Sapsai via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 29 15:00:07 PDT 2022


Author: Volodymyr Sapsai
Date: 2022-06-29T14:59:37-07:00
New Revision: 3514131219ffdc94c0c61c5b585b53e97501fbea

URL: https://github.com/llvm/llvm-project/commit/3514131219ffdc94c0c61c5b585b53e97501fbea
DIFF: https://github.com/llvm/llvm-project/commit/3514131219ffdc94c0c61c5b585b53e97501fbea.diff

LOG: [ODRHash diagnostics] Fix typos. NFC.

Added: 
    

Modified: 
    clang/include/clang/Basic/DiagnosticSerializationKinds.td
    clang/lib/Serialization/ASTReader.cpp
    clang/test/Modules/odr_hash.cpp

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/DiagnosticSerializationKinds.td b/clang/include/clang/Basic/DiagnosticSerializationKinds.td
index 33eba6cf0c3f2..251242e46fe5d 100644
--- a/clang/include/clang/Basic/DiagnosticSerializationKinds.td
+++ b/clang/include/clang/Basic/DiagnosticSerializationKinds.td
@@ -355,7 +355,7 @@ def err_module_odr_violation_enum : Error<
   "enum with specified type %4|"
   "enum with %4 element%s4|"
   "%ordinal4 element has name %5|"
-  "%ordinal4 element %5 %select{has|does not have}6 an initilizer|"
+  "%ordinal4 element %5 %select{has|does not have}6 an initializer|"
   "%ordinal4 element %5 has an initializer|"
   "}3">;
 

diff  --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index f15e0bcce3318..6bfd81634f50b 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -10636,7 +10636,7 @@ void ASTReader::diagnoseOdrViolations() {
 
         // Compare the hash generated to the hash stored.  A 
diff erence means
         // that a body was present in the original source.  Due to merging,
-        // the stardard way of detecting a body will not work.
+        // the standard way of detecting a body will not work.
         const bool HasFirstBody =
             ComputeCXXMethodODRHash(FirstMethod) != FirstMethod->getODRHash();
         const bool HasSecondBody =
@@ -11166,8 +11166,8 @@ void ASTReader::diagnoseOdrViolations() {
       DifferentSpecifiedTypes,
       DifferentNumberEnumConstants,
       EnumConstantName,
-      EnumConstantSingleInitilizer,
-      EnumConstantDifferentInitilizer,
+      EnumConstantSingleInitializer,
+      EnumConstantDifferentInitializer,
     };
 
     // If we've already pointed out a specific problem with this enum, don't
@@ -11301,18 +11301,18 @@ void ASTReader::diagnoseOdrViolations() {
           continue;
 
         if (!FirstInit || !SecondInit) {
-          ODRDiagError(FirstEnumConstant, EnumConstantSingleInitilizer)
+          ODRDiagError(FirstEnumConstant, EnumConstantSingleInitializer)
               << I + 1 << FirstEnumConstant << (FirstInit != nullptr);
-          ODRDiagNote(SecondEnumConstant, EnumConstantSingleInitilizer)
+          ODRDiagNote(SecondEnumConstant, EnumConstantSingleInitializer)
               << I + 1 << SecondEnumConstant << (SecondInit != nullptr);
           Diagnosed = true;
           break;
         }
 
         if (ComputeODRHash(FirstInit) != ComputeODRHash(SecondInit)) {
-          ODRDiagError(FirstEnumConstant, EnumConstantDifferentInitilizer)
+          ODRDiagError(FirstEnumConstant, EnumConstantDifferentInitializer)
               << I + 1 << FirstEnumConstant;
-          ODRDiagNote(SecondEnumConstant, EnumConstantDifferentInitilizer)
+          ODRDiagNote(SecondEnumConstant, EnumConstantDifferentInitializer)
               << I + 1 << SecondEnumConstant;
           Diagnosed = true;
           break;

diff  --git a/clang/test/Modules/odr_hash.cpp b/clang/test/Modules/odr_hash.cpp
index 81899943bc64c..aed08c1a3a044 100644
--- a/clang/test/Modules/odr_hash.cpp
+++ b/clang/test/Modules/odr_hash.cpp
@@ -3300,7 +3300,7 @@ enum E7 { x71 = 0 };
 enum E7 { x71 };
 #else
 E7 e7;
-// expected-error at second.h:* {{'Enums::E7' has 
diff erent definitions in 
diff erent modules; definition in module 'SecondModule' first 
diff erence is 1st element 'x71' has an initilizer}}
+// expected-error at second.h:* {{'Enums::E7' has 
diff erent definitions in 
diff erent modules; definition in module 'SecondModule' first 
diff erence is 1st element 'x71' has an initializer}}
 // expected-note at first.h:* {{but in 'FirstModule' found 1st element 'x71' does not have an initializer}}
 #endif
 
@@ -3310,7 +3310,7 @@ enum E8 { x81 };
 enum E8 { x81 = 0 };
 #else
 E8 e8;
-// expected-error at second.h:* {{'Enums::E8' has 
diff erent definitions in 
diff erent modules; definition in module 'SecondModule' first 
diff erence is 1st element 'x81' does not have an initilizer}}
+// expected-error at second.h:* {{'Enums::E8' has 
diff erent definitions in 
diff erent modules; definition in module 'SecondModule' first 
diff erence is 1st element 'x81' does not have an initializer}}
 // expected-note at first.h:* {{but in 'FirstModule' found 1st element 'x81' has an initializer}}
 #endif
 


        


More information about the cfe-commits mailing list