[Mlir-commits] [clang] [clang-tools-extra] [compiler-rt] [flang] [libc] [libcxx] [lldb] [llvm] [mlir] [openmp] Fix typos and spelling errors across codebase (PR #156270)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Aug 31 20:42:37 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-static-analyzer-1

Author: Austin Jiang (AustinBoyuJiang)

<details>
<summary>Changes</summary>

Corrected various spelling mistakes such as 'occurred', 'receiver', 'initialized', 'length', and others in comments, variable names, function names, and documentation throughout the project. These changes improve code readability and maintain consistency in naming and documentation.

---

Patch is 84.62 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/156270.diff


96 Files Affected:

- (modified) bolt/lib/Core/DebugNames.cpp (+3-3) 
- (modified) bolt/test/X86/Inputs/dwarf4-gdb-index-types-helper.s (+2-2) 
- (modified) bolt/test/X86/Inputs/dwarf4-gdb-index-types-main.s (+2-2) 
- (modified) clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp (+3-3) 
- (modified) clang-tools-extra/clangd/Hover.cpp (+1-1) 
- (modified) clang-tools-extra/clangd/index/FileIndex.cpp (+1-1) 
- (modified) clang-tools-extra/test/clang-tidy/checkers/abseil/faster-strsplit-delimiter.cpp (+1-1) 
- (modified) clang-tools-extra/test/clang-tidy/checkers/readability/function-cognitive-complexity.cpp (+2-2) 
- (modified) clang/docs/ReleaseNotes.rst (+1-1) 
- (modified) clang/include/clang/Sema/Sema.h (+1-1) 
- (modified) clang/include/clang/StaticAnalyzer/Checkers/Checkers.td (+2-2) 
- (modified) clang/lib/APINotes/APINotesYAMLCompiler.cpp (+5-5) 
- (modified) clang/lib/Analysis/FlowSensitive/Transfer.cpp (+1-1) 
- (modified) clang/lib/Basic/OpenMPKinds.cpp (+1-1) 
- (modified) clang/lib/CrossTU/CrossTranslationUnit.cpp (+3-3) 
- (modified) clang/lib/Parse/ParseHLSLRootSignature.cpp (+1-1) 
- (modified) clang/lib/Sema/CheckExprLifetime.cpp (+2-2) 
- (modified) clang/lib/Sema/SemaCUDA.cpp (+1-1) 
- (modified) clang/lib/Sema/SemaDeclCXX.cpp (+4-4) 
- (modified) clang/lib/Sema/TreeTransform.h (+1-1) 
- (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/ForwardDeclChecker.cpp (+2-2) 
- (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefCallArgsChecker.cpp (+1-1) 
- (modified) clang/test/Analysis/Checkers/WebKit/unretained-call-args.mm (+1-1) 
- (modified) clang/test/Analysis/csv2json.py (+1-1) 
- (modified) clang/test/Analysis/cxx-uninitialized-object-inheritance.cpp (+1-1) 
- (modified) clang/test/Analysis/cxx-uninitialized-object.cpp (+2-2) 
- (modified) clang/test/Analysis/uninit-ps-rdar6145427.m (+2-2) 
- (modified) clang/test/CXX/except/except.spec/p13-friend.cpp (+1-1) 
- (modified) clang/test/CodeGenCXX/ctor-empty-nounique.cpp (+1-1) 
- (modified) clang/unittests/Format/FormatTestCSharp.cpp (+4-4) 
- (modified) compiler-rt/lib/builtins/arm/addsf3.S (+1-1) 
- (modified) compiler-rt/lib/builtins/fp_add_impl.inc (+1-1) 
- (modified) compiler-rt/lib/gwp_asan/tests/backtrace.cpp (+1-1) 
- (modified) flang-rt/unittests/Runtime/NumericalFormatTest.cpp (+3-3) 
- (modified) flang/lib/Lower/ConvertConstant.cpp (+1-1) 
- (modified) flang/lib/Semantics/check-omp-structure.cpp (+3-3) 
- (modified) libc/src/__support/RPC/rpc_server.h (+2-2) 
- (modified) libc/src/__support/math/cbrt.h (+2-2) 
- (modified) libc/src/__support/str_to_float.h (+2-2) 
- (modified) libc/src/stdio/generic/fgets.cpp (+1-1) 
- (modified) libc/src/stdlib/strfroml.cpp (+1-1) 
- (modified) libc/test/integration/startup/gpu/rpc_interface_test.cpp (+1-1) 
- (modified) libcxx/include/__math/special_functions.h (+1-1) 
- (modified) lldb/docs/resources/lldbgdbremote.md (+1-1) 
- (modified) lldb/docs/resources/qemu-testing.rst (+1-1) 
- (modified) lldb/include/lldb/API/SBCommandInterpreter.h (+1-1) 
- (modified) lldb/include/lldb/Target/Platform.h (+1-1) 
- (modified) lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h (+5-5) 
- (modified) lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (+1-1) 
- (modified) lldb/source/Plugins/TraceExporter/common/TraceHTR.cpp (+1-1) 
- (modified) lldb/source/Plugins/TraceExporter/common/TraceHTR.h (+1-1) 
- (modified) lldb/source/ValueObject/DILEval.cpp (+1-1) 
- (modified) lldb/test/API/linux/aarch64/mte_core_file/TestAArch64LinuxMTEMemoryTagCoreFile.py (+1-1) 
- (modified) lldb/test/API/linux/aarch64/mte_tag_access/TestAArch64LinuxMTEMemoryTagAccess.py (+2-2) 
- (modified) lldb/test/API/macosx/dsym_modules/TestdSYMModuleInit.py (+1-1) 
- (modified) lldb/test/Shell/SymbolFile/DWARF/split-dwarf-expression-eval-bug.cpp (+1-1) 
- (modified) lldb/unittests/Utility/StreamTest.cpp (+2-2) 
- (modified) llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h (+1-1) 
- (modified) llvm/include/llvm/Support/LEB128.h (+2-2) 
- (modified) llvm/include/llvm/Support/raw_socket_stream.h (+1-1) 
- (modified) llvm/lib/CodeGen/RegisterPressure.cpp (+1-1) 
- (modified) llvm/lib/DebugInfo/DWARF/DWARFContext.cpp (+1-1) 
- (modified) llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp (+2-2) 
- (modified) llvm/lib/Support/TextEncoding.cpp (+3-3) 
- (modified) llvm/lib/Support/UnicodeNameToCodepointGenerated.cpp (+1-1) 
- (modified) llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp (+1-1) 
- (modified) llvm/lib/Target/AMDGPU/AMDGPUSwLowerLDS.cpp (+2-2) 
- (modified) llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp (+1-1) 
- (modified) llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp (+1-1) 
- (modified) llvm/lib/Target/X86/X86SchedLunarlakeP.td (+1-1) 
- (modified) llvm/lib/Transforms/IPO/AttributorAttributes.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Scalar/LICM.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp (+2-2) 
- (modified) llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp (+1-1) 
- (modified) llvm/lib/Transforms/Utils/IRNormalizer.cpp (+4) 
- (modified) llvm/test/CodeGen/AArch64/settag-merge-nonaligned-fp.ll (+1-1) 
- (modified) llvm/test/CodeGen/AMDGPU/coalescing_makes_lanes_undef.mir (+1-1) 
- (modified) llvm/test/DebugInfo/typeunit-header.test (+1-1) 
- (modified) llvm/test/MC/COFF/section.s (+1-1) 
- (modified) llvm/test/Transforms/PreISelIntrinsicLowering/X86/objc-arc.ll (+2-2) 
- (modified) llvm/test/tools/dsymutil/X86/modules-empty.m (+1-1) 
- (modified) llvm/test/tools/llvm-mca/X86/Haswell/mulx-same-regs.s (+1-1) 
- (modified) llvm/test/tools/llvm-mca/X86/SkylakeClient/mulx-same-regs.s (+1-1) 
- (modified) llvm/test/tools/llvm-mca/X86/Znver3/mulx-same-regs.s (+1-1) 
- (modified) llvm/test/tools/llvm-ranlib/D-flag.test (+1-1) 
- (modified) mlir/include/mlir/Analysis/DataFlowFramework.h (+1-1) 
- (modified) mlir/include/mlir/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.h (+1-1) 
- (modified) mlir/include/mlir/Interfaces/TilingInterface.td (+2-2) 
- (modified) mlir/lib/Dialect/Arith/IR/ArithOps.cpp (+1-1) 
- (modified) mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMapParser.cpp (+1-1) 
- (modified) mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp (+1-1) 
- (modified) mlir/test/Dialect/Arith/invalid.mlir (+2-2) 
- (modified) mlir/test/lib/Analysis/TestDataFlowFramework.cpp (+1-1) 
- (modified) openmp/libompd/gdb-plugin/ompdModule.c (+3-3) 
- (modified) openmp/runtime/src/kmp_runtime.cpp (+2-2) 
- (modified) openmp/runtime/test/api/omp60_memory_routines.c (+1-1) 


``````````diff
diff --git a/bolt/lib/Core/DebugNames.cpp b/bolt/lib/Core/DebugNames.cpp
index a9d98a6ba879b..d9e8479f12ed6 100644
--- a/bolt/lib/Core/DebugNames.cpp
+++ b/bolt/lib/Core/DebugNames.cpp
@@ -55,7 +55,7 @@ DWARF5AcceleratorTable::DWARF5AcceleratorTable(
           llvm::hash_value(llvm::StringRef(CStr)), StrOffset);
       if (!R.second)
         BC.errs()
-            << "BOLT-WARNING: [internal-dwarf-error]: collision occured on "
+            << "BOLT-WARNING: [internal-dwarf-error]: collision occurred on "
             << CStr << " at offset : 0x" << Twine::utohexstr(StrOffset)
             << ". Previous string offset is: 0x"
             << Twine::utohexstr(R.first->second) << ".\n";
@@ -677,11 +677,11 @@ static constexpr uint32_t getDebugNamesHeaderSize() {
   constexpr uint32_t BucketCountLength = sizeof(uint32_t);
   constexpr uint32_t NameCountLength = sizeof(uint32_t);
   constexpr uint32_t AbbrevTableSizeLength = sizeof(uint32_t);
-  constexpr uint32_t AugmentationStringSizeLenght = sizeof(uint32_t);
+  constexpr uint32_t AugmentationStringSizeLength = sizeof(uint32_t);
   return VersionLength + PaddingLength + CompUnitCountLength +
          LocalTypeUnitCountLength + ForeignTypeUnitCountLength +
          BucketCountLength + NameCountLength + AbbrevTableSizeLength +
-         AugmentationStringSizeLenght;
+         AugmentationStringSizeLength;
 }
 
 void DWARF5AcceleratorTable::emitHeader() const {
diff --git a/bolt/test/X86/Inputs/dwarf4-gdb-index-types-helper.s b/bolt/test/X86/Inputs/dwarf4-gdb-index-types-helper.s
index 51613e623abb9..affdc9e8ee52d 100644
--- a/bolt/test/X86/Inputs/dwarf4-gdb-index-types-helper.s
+++ b/bolt/test/X86/Inputs/dwarf4-gdb-index-types-helper.s
@@ -16,7 +16,7 @@
 	.type	_Z3foov, at function
 _Z3foov:                                # @_Z3foov
 .Lfunc_begin0:
-	.file	1 "/dwarf4-lenght-test" "helper.cpp"
+	.file	1 "/dwarf4-length-test" "helper.cpp"
 	.loc	1 7 0                           # helper.cpp:7:0
 	.cfi_startproc
 # %bb.0:
@@ -257,7 +257,7 @@ _Z3foov:                                # @_Z3foov
 .Linfo_string1:
 	.asciz	"helper.cpp"                    # string offset=146
 .Linfo_string2:
-	.asciz	"/home/ayermolo/local/tasks/T117448832/dwarf4-lenght-test" # string offset=157
+	.asciz	"/home/ayermolo/local/tasks/T117448832/dwarf4-length-test" # string offset=157
 .Linfo_string3:
 	.asciz	"_Z3foov"                       # string offset=214
 .Linfo_string4:
diff --git a/bolt/test/X86/Inputs/dwarf4-gdb-index-types-main.s b/bolt/test/X86/Inputs/dwarf4-gdb-index-types-main.s
index f5393cf94d463..dda537ab0adea 100644
--- a/bolt/test/X86/Inputs/dwarf4-gdb-index-types-main.s
+++ b/bolt/test/X86/Inputs/dwarf4-gdb-index-types-main.s
@@ -16,7 +16,7 @@
 	.type	main, at function
 main:                                   # @main
 .Lfunc_begin0:
-	.file	1 "/dwarf4-lenght-test" "main.cpp"
+	.file	1 "/dwarf4-length-test" "main.cpp"
 	.loc	1 7 0                           # main.cpp:7:0
 	.cfi_startproc
 # %bb.0:
@@ -258,7 +258,7 @@ main:                                   # @main
 .Linfo_string1:
 	.asciz	"main.cpp"                      # string offset=146
 .Linfo_string2:
-	.asciz	"/dwarf4-lenght-test" # string offset=155
+	.asciz	"/dwarf4-length-test" # string offset=155
 .Linfo_string3:
 	.asciz	"main"                          # string offset=212
 .Linfo_string4:
diff --git a/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
index cea48ce6f4564..fe148f6ac7f5d 100644
--- a/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
@@ -294,7 +294,7 @@ bool MakeSmartPtrCheck::replaceNew(DiagnosticBuilder &Diag,
   //   Foo(Bar{1, 2}) => true
   //   Foo(1) => false
   //   Foo{1} => false
-  auto HasListIntializedArgument = [](const CXXConstructExpr *CE) {
+  auto HasListInitializedArgument = [](const CXXConstructExpr *CE) {
     for (const auto *Arg : CE->arguments()) {
       Arg = Arg->IgnoreImplicit();
 
@@ -350,7 +350,7 @@ bool MakeSmartPtrCheck::replaceNew(DiagnosticBuilder &Diag,
     //   std::make_smart_ptr<S2>(std::vector<int>({1}));
     //   std::make_smart_ptr<S3>(S2{1, 2}, 3);
     if (const auto *CE = New->getConstructExpr()) {
-      if (HasListIntializedArgument(CE))
+      if (HasListInitializedArgument(CE))
         return false;
     }
     if (ArraySizeExpr.empty()) {
@@ -372,7 +372,7 @@ bool MakeSmartPtrCheck::replaceNew(DiagnosticBuilder &Diag,
     SourceRange InitRange;
     if (const auto *NewConstruct = New->getConstructExpr()) {
       if (NewConstruct->isStdInitListInitialization() ||
-          HasListIntializedArgument(NewConstruct)) {
+          HasListInitializedArgument(NewConstruct)) {
         // FIXME: Add fixes for direct initialization with the initializer-list
         // constructor. Similar to the above CallInit case, the type has to be
         // specified explicitly in the fixes.
diff --git a/clang-tools-extra/clangd/Hover.cpp b/clang-tools-extra/clangd/Hover.cpp
index 9eec322fe5963..7cdff7c2a851c 100644
--- a/clang-tools-extra/clangd/Hover.cpp
+++ b/clang-tools-extra/clangd/Hover.cpp
@@ -1782,7 +1782,7 @@ void parseDocumentationParagraph(llvm::StringRef Text, markup::Paragraph &Out) {
 
 void parseDocumentation(llvm::StringRef Input, markup::Document &Output) {
   // A documentation string is treated as a sequence of paragraphs,
-  // where the paragraphs are seperated by at least one empty line
+  // where the paragraphs are separated by at least one empty line
   // (meaning 2 consecutive newline characters).
   // Possible leading empty lines (introduced by an odd number > 1 of
   // empty lines between 2 paragraphs) will be removed later in the Markup
diff --git a/clang-tools-extra/clangd/index/FileIndex.cpp b/clang-tools-extra/clangd/index/FileIndex.cpp
index c49de377d54ca..2e005bfe3537e 100644
--- a/clang-tools-extra/clangd/index/FileIndex.cpp
+++ b/clang-tools-extra/clangd/index/FileIndex.cpp
@@ -143,7 +143,7 @@ FileShardedIndex::FileShardedIndex(IndexFileIn Input)
       }
     }
   }
-  // Attribute references into each file they occured in.
+  // Attribute references into each file they occurred in.
   if (Index.Refs) {
     for (const auto &SymRefs : *Index.Refs) {
       for (const auto &R : SymRefs.second) {
diff --git a/clang-tools-extra/test/clang-tidy/checkers/abseil/faster-strsplit-delimiter.cpp b/clang-tools-extra/test/clang-tidy/checkers/abseil/faster-strsplit-delimiter.cpp
index e6787f8083750..afacf9475c104 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/abseil/faster-strsplit-delimiter.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/abseil/faster-strsplit-delimiter.cpp
@@ -77,7 +77,7 @@ void SplitDelimiters() {
   // CHECK-MESSAGES: [[@LINE-1]]:25: warning: absl::StrSplit()
   // CHECK-FIXES: absl::StrSplit("ABC", 'A', [](absl::string_view) { return true; });
 
-  // Doesn't do anything with other strings lenghts.
+  // Doesn't do anything with other strings lengths.
   absl::StrSplit("ABC", "AB");
   absl::StrSplit("ABC", absl::ByAnyChar(""));
   absl::StrSplit("ABC", absl::ByAnyChar(" \t"));
diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/function-cognitive-complexity.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/function-cognitive-complexity.cpp
index 2f11e0c3e3171..573e3f6ce8160 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/readability/function-cognitive-complexity.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/readability/function-cognitive-complexity.cpp
@@ -65,7 +65,7 @@ void unittest_false() {
 //------------------------------ B1. Increments ------------------------------//
 //----------------------------------------------------------------------------//
 // Check that every thing listed in B1 of the specification does indeed       //
-// recieve the base increment, and that not-body does not increase nesting    //
+// receive the base increment, and that not-body does not increase nesting    //
 //----------------------------------------------------------------------------//
 
 // break does not increase cognitive complexity.
@@ -698,7 +698,7 @@ void unittest_b2_10() {
 //-------------------------- B3. Nesting increments --------------------------//
 //----------------------------------------------------------------------------//
 // Check that every thing listed in B3 of the specification does indeed       //
-// recieve the penalty of the current nesting level                           //
+// receive the penalty of the current nesting level                           //
 //----------------------------------------------------------------------------//
 
 void unittest_b3_00() {
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 4ad562f2579c6..d269ebfde2a7b 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -320,7 +320,7 @@ Bug Fixes to C++ Support
   casts that are guaranteed to fail (#GH137518).
 - Fix bug rejecting partial specialization of variable templates with auto NTTPs (#GH118190).
 - Fix a crash if errors "member of anonymous [...] redeclares" and
-  "intializing multiple members of union" coincide (#GH149985).
+  "initializing multiple members of union" coincide (#GH149985).
 - Fix a crash when using ``explicit(bool)`` in pre-C++11 language modes. (#GH152729)
 - Fix the parsing of variadic member functions when the ellipis immediately follows a default argument.(#GH153445)
 - Fixed a bug that caused ``this`` captured by value in a lambda with a dependent explicit object parameter to not be
diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h
index c3fb57774c8dc..fe81350885614 100644
--- a/clang/include/clang/Sema/Sema.h
+++ b/clang/include/clang/Sema/Sema.h
@@ -6946,7 +6946,7 @@ class Sema final : public SemaBase {
                          const ObjCInterfaceDecl *UnknownObjCClass = nullptr,
                          bool ObjCPropertyAccess = false,
                          bool AvoidPartialAvailabilityChecks = false,
-                         ObjCInterfaceDecl *ClassReciever = nullptr,
+                         ObjCInterfaceDecl *ClassReceiver = nullptr,
                          bool SkipTrailingRequiresClause = false);
 
   /// Emit a note explaining that this function is deleted.
diff --git a/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td b/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
index 73f702de581d9..b9b7407c98c56 100644
--- a/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
+++ b/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
@@ -193,12 +193,12 @@ def CallAndMessageChecker : Checker<"CallAndMessage">,
                   InAlpha>,
     CmdLineOption<Boolean,
                   "NilReceiver",
-                  "Check whether the reciever in the message expression is nil",
+                  "Check whether the receiver in the message expression is nil",
                   "true",
                   Released>,
     CmdLineOption<Boolean,
                   "UndefReceiver",
-                  "Check whether the reciever in the message expression is "
+                  "Check whether the receiver in the message expression is "
                   "undefined",
                   "true",
                   Released>,
diff --git a/clang/lib/APINotes/APINotesYAMLCompiler.cpp b/clang/lib/APINotes/APINotesYAMLCompiler.cpp
index a91a1eea03d81..8cf441b988c71 100644
--- a/clang/lib/APINotes/APINotesYAMLCompiler.cpp
+++ b/clang/lib/APINotes/APINotesYAMLCompiler.cpp
@@ -713,14 +713,14 @@ class YAMLConverter {
   llvm::raw_ostream &OS;
   llvm::SourceMgr::DiagHandlerTy DiagHandler;
   void *DiagHandlerCtxt;
-  bool ErrorOccured;
+  bool ErrorOccurred;
 
   /// Emit a diagnostic
   bool emitError(llvm::Twine Message) {
     DiagHandler(
         llvm::SMDiagnostic("", llvm::SourceMgr::DK_Error, Message.str()),
         DiagHandlerCtxt);
-    ErrorOccured = true;
+    ErrorOccurred = true;
     return true;
   }
 
@@ -731,7 +731,7 @@ class YAMLConverter {
                 void *DiagHandlerCtxt)
       : M(TheModule), Writer(TheModule.Name, SourceFile), OS(OS),
         DiagHandler(DiagHandler), DiagHandlerCtxt(DiagHandlerCtxt),
-        ErrorOccured(false) {}
+        ErrorOccurred(false) {}
 
   void convertAvailability(const AvailabilityItem &Availability,
                            CommonEntityInfo &CEI, llvm::StringRef APIName) {
@@ -1200,10 +1200,10 @@ class YAMLConverter {
       convertTopLevelItems(/* context */ std::nullopt, Versioned.Items,
                            Versioned.Version);
 
-    if (!ErrorOccured)
+    if (!ErrorOccurred)
       Writer.writeToStream(OS);
 
-    return ErrorOccured;
+    return ErrorOccurred;
   }
 };
 } // namespace
diff --git a/clang/lib/Analysis/FlowSensitive/Transfer.cpp b/clang/lib/Analysis/FlowSensitive/Transfer.cpp
index 23a6de45e18b1..671b251263c7f 100644
--- a/clang/lib/Analysis/FlowSensitive/Transfer.cpp
+++ b/clang/lib/Analysis/FlowSensitive/Transfer.cpp
@@ -96,7 +96,7 @@ static BoolValue &unpackValue(BoolValue &V, Environment &Env) {
 }
 
 // Unpacks the value (if any) associated with `E` and updates `E` to the new
-// value, if any unpacking occured. Also, does the lvalue-to-rvalue conversion,
+// value, if any unpacking occurred. Also, does the lvalue-to-rvalue conversion,
 // by skipping past the reference.
 static Value *maybeUnpackLValueExpr(const Expr &E, Environment &Env) {
   auto *Loc = Env.getStorageLocation(E);
diff --git a/clang/lib/Basic/OpenMPKinds.cpp b/clang/lib/Basic/OpenMPKinds.cpp
index 220b31b0f19bc..b72f2637ec8bc 100644
--- a/clang/lib/Basic/OpenMPKinds.cpp
+++ b/clang/lib/Basic/OpenMPKinds.cpp
@@ -809,7 +809,7 @@ void clang::getOpenMPCaptureRegions(
 
   auto GetRegionsForLeaf = [&](OpenMPDirectiveKind LKind) {
     assert(isLeafConstruct(LKind) && "Epecting leaf directive");
-    // Whether a leaf would require OMPD_unknown if it occured on its own.
+    // Whether a leaf would require OMPD_unknown if it occurred on its own.
     switch (LKind) {
     case OMPD_metadirective:
       CaptureRegions.push_back(OMPD_metadirective);
diff --git a/clang/lib/CrossTU/CrossTranslationUnit.cpp b/clang/lib/CrossTU/CrossTranslationUnit.cpp
index fb2a79ab657db..09d5e9cbe1ab6 100644
--- a/clang/lib/CrossTU/CrossTranslationUnit.cpp
+++ b/clang/lib/CrossTU/CrossTranslationUnit.cpp
@@ -199,10 +199,10 @@ parseCrossTUIndex(StringRef IndexPath) {
     SmallString<32> FilePath(FilePathInIndex);
     llvm::sys::path::native(FilePath, llvm::sys::path::Style::posix);
 
-    bool InsertionOccured;
-    std::tie(std::ignore, InsertionOccured) =
+    bool InsertionOccurred;
+    std::tie(std::ignore, InsertionOccurred) =
         Result.try_emplace(LookupName, FilePath.begin(), FilePath.end());
-    if (!InsertionOccured)
+    if (!InsertionOccurred)
       return llvm::make_error<IndexError>(
           index_error_code::multiple_definitions, IndexPath.str(), LineNo);
 
diff --git a/clang/lib/Parse/ParseHLSLRootSignature.cpp b/clang/lib/Parse/ParseHLSLRootSignature.cpp
index 1af72f8b1c934..2586cba5d77c6 100644
--- a/clang/lib/Parse/ParseHLSLRootSignature.cpp
+++ b/clang/lib/Parse/ParseHLSLRootSignature.cpp
@@ -1323,7 +1323,7 @@ std::optional<float> RootSignatureParser::handleFloatLiteral(bool Negated) {
   llvm::APFloat::opStatus Status(Literal.GetFloatValue(Val, DXCRoundingMode));
 
   // Note: we do not error when opStatus::opInexact by itself as this just
-  // denotes that rounding occured but not that it is invalid
+  // denotes that rounding occurred but not that it is invalid
   assert(!(Status & llvm::APFloat::opStatus::opInvalidOp) &&
          "NumSpelling consists only of [0-9.ef+-]. Any malformed NumSpelling "
          "will be caught and reported by NumericLiteralParser.");
diff --git a/clang/lib/Sema/CheckExprLifetime.cpp b/clang/lib/Sema/CheckExprLifetime.cpp
index e02e00231e58e..276108979bb4e 100644
--- a/clang/lib/Sema/CheckExprLifetime.cpp
+++ b/clang/lib/Sema/CheckExprLifetime.cpp
@@ -453,7 +453,7 @@ shouldTrackFirstArgumentForConstructor(const CXXConstructExpr *Ctor) {
   // patterns.
   auto RHSArgType = Ctor->getArg(0)->getType();
   const auto *RHSRD = RHSArgType->getAsRecordDecl();
-  // LHS is constructed from an intializer_list.
+  // LHS is constructed from an initializer_list.
   //
   // std::initializer_list is a proxy object that provides access to the backing
   // array. We perform analysis on it to determine if there are any dangling
@@ -1632,7 +1632,7 @@ checkExprLifetimeImpl(Sema &SemaRef, const InitializedEntity *InitEntity,
   else
     visitLocalsRetainedByInitializer(
         Path, Init, TemporaryVisitor,
-        // Don't revisit the sub inits for the intialization case.
+        // Don't revisit the sub inits for the initialization case.
         /*RevisitSubinits=*/!InitEntity);
 }
 
diff --git a/clang/lib/Sema/SemaCUDA.cpp b/clang/lib/Sema/SemaCUDA.cpp
index 2e3cbb336a0c8..ff2553f37dcdb 100644
--- a/clang/lib/Sema/SemaCUDA.cpp
+++ b/clang/lib/Sema/SemaCUDA.cpp
@@ -165,7 +165,7 @@ SemaCUDA::CUDAVariableTarget SemaCUDA::IdentifyTarget(const VarDecl *Var) {
     return CVT_Unified;
   // Only constexpr and const variabless with implicit constant attribute
   // are emitted on both sides. Such variables are promoted to device side
-  // only if they have static constant intializers on device side.
+  // only if they have static constant initializers on device side.
   if ((Var->isConstexpr() || Var->getType().isConstQualified()) &&
       Var->hasAttr<CUDAConstantAttr>() &&
       !hasExplicitAttr<CUDAConstantAttr>(Var))
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 4b0dead182543..f9f1a9b4589a7 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -10986,18 +10986,18 @@ void Sema::ActOnFinishDelayedCXXMethodDeclaration(Scope *S, Decl *MethodD) {
 static void checkMethodTypeQualifiers(Sema &S, Declarator &D, unsigned DiagID) {
   const DeclaratorChunk::FunctionTypeInfo &FTI = D.getFunctionTypeInfo();
   if (FTI.hasMethodTypeQualifiers() && !D.isInvalidType()) {
-    bool DiagOccured = false;
+    bool DiagOccurred = false;
     FTI.MethodQualifiers->forEachQualifier(
-        [DiagID, &S, &DiagOccured](DeclSpec::TQ, StringRef QualName,
+        [DiagID, &S, &DiagOccurred](DeclSpec::TQ, StringRef QualName,
                                    SourceLocation SL) {
           // This diagnostic should be emitted on any qualifier except an addr
           // space qualifier. However, forEachQualifier currently doesn't visit
           // addr space qualifiers, so there's no way to write this condition
           // right now; we just diagnose on everything.
           S.Diag(SL, DiagID) << QualName << SourceRange(SL);
-          DiagOccured = true;
+          DiagOccurred = true;
         });
-    if (DiagOccured)
+    if (DiagOccurred)
       D.setInvalidType();
   }
 }
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index aa1bb3232d6fa..face48503c3c6 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -5273,7 +5273,7 @@ bool TreeTransform<Derived>::PreparePackForExpansion(TemplateArgumentLoc In,
   //   };
   //   TupleWithInt<int>::type y;
   // At this point we will see the `__builtin_dedup_pack<int, int>` with a known
-  // lenght and run `ComputeInfo()` to provide the necessary information to our
+  // length and run `ComputeInfo()` to provide the necessary information to our
   // caller.
   //
   // Note that we may still have situations where builtin is not going to be
diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/ForwardDeclChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/WebKit/ForwardDeclChecker.cpp
index ec0c2c117fb29..cad501f95a364 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/ForwardDeclChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/ForwardDeclChecker.cpp
@@ -248,7 +248,7 @@ class ForwardDeclChecker : public Checker<check::ASTDecl<TranslationUnitDecl>> {
     if (auto *Receiver = E->getInstanceReceiver()) {
       Receiver = Receiver->IgnoreParenCasts();
       if (isUnknownType(E->getReceiverType()))
-        reportUnknownRecieverType(Receiver, DeclWithIssue);
+        reportUnknownReceiverType(Receiver, DeclWithIssue);
     }
 
     auto *MethodDecl = E->getMethodDecl();
@@ -307,7 +307,7 @@ class ForwardDeclChecker : pub...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/156270


More information about the Mlir-commits mailing list