[clang] 5f038e0 - [Clang][NFC] Fix "initalizer" typo

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 10 00:06:28 PDT 2023


Author: Corentin Jabot
Date: 2023-07-10T09:06:19+02:00
New Revision: 5f038e0e20641515fe412e1df298a62eb657f554

URL: https://github.com/llvm/llvm-project/commit/5f038e0e20641515fe412e1df298a62eb657f554
DIFF: https://github.com/llvm/llvm-project/commit/5f038e0e20641515fe412e1df298a62eb657f554.diff

LOG: [Clang][NFC] Fix "initalizer" typo

Added: 
    

Modified: 
    clang/include/clang/Basic/DiagnosticASTKinds.td
    clang/include/clang/Basic/DiagnosticSemaKinds.td
    clang/lib/CodeGen/CGDeclCXX.cpp
    clang/lib/Sema/SemaDecl.cpp
    clang/lib/Sema/SemaInit.cpp
    clang/test/Modules/odr_hash.cpp
    clang/test/SemaCXX/cxx2a-consteval-default-params.cpp

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/DiagnosticASTKinds.td b/clang/include/clang/Basic/DiagnosticASTKinds.td
index 856293dd45d089..566cdc3406058f 100644
--- a/clang/include/clang/Basic/DiagnosticASTKinds.td
+++ b/clang/include/clang/Basic/DiagnosticASTKinds.td
@@ -781,7 +781,7 @@ def err_module_odr_violation_field : Error<
   "%select{non-|}5bitfield %4|"
   "bitfield %4 with one width expression|"
   "%select{non-|}5mutable field %4|"
-  "field %4 with %select{no|an}5 initalizer|"
+  "field %4 with %select{no|an}5 initializer|"
   "field %4 with an initializer"
   "}3">;
 def note_module_odr_violation_field : Note<

diff  --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index 7ca91020181845..eea4d4961c077a 100644
--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -2671,7 +2671,7 @@ def note_immediate_function_reason : Note<
   "expression}3">;
 
 def note_invalid_consteval_initializer : Note<
-  "in the default initalizer of %0">;
+  "in the default initializer of %0">;
 def note_invalid_consteval_initializer_here : Note<
   "initialized here %0">;
 def err_invalid_consteval_decl_kind : Error<
@@ -9660,7 +9660,7 @@ def note_lambda_capture_initializer : Note<
   "%select{implicitly |}2captured%select{| by reference}3"
   "%select{%select{ due to use|}2 here|"
   " via initialization of lambda capture %0}1">;
-def note_init_with_default_member_initalizer : Note<
+def note_init_with_default_member_initializer : Note<
   "initializing field %0 with default member initializer">;
 
 // Check for initializing a member variable with the address or a reference to

diff  --git a/clang/lib/CodeGen/CGDeclCXX.cpp b/clang/lib/CodeGen/CGDeclCXX.cpp
index 8a77ffeed52f7c..be8fb6c274db10 100644
--- a/clang/lib/CodeGen/CGDeclCXX.cpp
+++ b/clang/lib/CodeGen/CGDeclCXX.cpp
@@ -643,7 +643,7 @@ void CodeGenModule::EmitCXXThreadLocalInitFunc() {
    This is arranged to be run only once regardless of how many times the module
    might be included transitively.  This arranged by using a guard variable.
 
-   If there are no initalizers at all (and also no imported modules) we reduce
+   If there are no initializers at all (and also no imported modules) we reduce
    this to an empty function (since the Itanium ABI requires that this function
    be available to a caller, which might be produced by a 
diff erent
    implementation).

diff  --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index e3cbcd6795ea66..7a4e154cb26110 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -19601,7 +19601,7 @@ static void CheckForDuplicateEnumValues(Sema &S, ArrayRef<Decl *> Elements,
       return;
     }
 
-    // Constants with initalizers are handled in the next loop.
+    // Constants with initializers are handled in the next loop.
     if (ECD->getInitExpr())
       continue;
 

diff  --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index 71d59a64fb5767..89fd56fb660b8b 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -8282,7 +8282,7 @@ void Sema::checkInitializerLifetime(const InitializedEntity &Entity,
 
       case IndirectLocalPathEntry::DefaultInit: {
         auto *FD = cast<FieldDecl>(Elem.D);
-        Diag(FD->getLocation(), diag::note_init_with_default_member_initalizer)
+        Diag(FD->getLocation(), diag::note_init_with_default_member_initializer)
             << FD << nextPathEntryRange(Path, I + 1, L);
         break;
       }

diff  --git a/clang/test/Modules/odr_hash.cpp b/clang/test/Modules/odr_hash.cpp
index fffac5e318f5d5..c5bf6e873e52ec 100644
--- a/clang/test/Modules/odr_hash.cpp
+++ b/clang/test/Modules/odr_hash.cpp
@@ -334,7 +334,7 @@ struct S10 {
 };
 #else
 S10 s10;
-// expected-error at second.h:* {{'Field::S10' has 
diff erent definitions in 
diff erent modules; first 
diff erence is definition in module 'SecondModule' found field 'x' with no initalizer}}
+// expected-error at second.h:* {{'Field::S10' has 
diff erent definitions in 
diff erent modules; first 
diff erence is definition in module 'SecondModule' found field 'x' with no initializer}}
 // expected-note at first.h:* {{but in 'FirstModule' found field 'x' with an initializer}}
 #endif
 

diff  --git a/clang/test/SemaCXX/cxx2a-consteval-default-params.cpp b/clang/test/SemaCXX/cxx2a-consteval-default-params.cpp
index c9a0ae9dd27b6e..da8315a28bbca1 100644
--- a/clang/test/SemaCXX/cxx2a-consteval-default-params.cpp
+++ b/clang/test/SemaCXX/cxx2a-consteval-default-params.cpp
@@ -20,7 +20,7 @@ int check_lambdas_used(
                               // expected-note  {{declared here}} \
                               // expected-note  {{undefined function 'undefined'}}
         return defaulted;
-    }(),  // expected-note {{in the default initalizer of 'defaulted'}}
+    }(),  // expected-note {{in the default initializer of 'defaulted'}}
     int d = [](int defaulted = sizeof(undefined())) {
         return defaulted;
     }()


        


More information about the cfe-commits mailing list