From f2c2e924e73a76562b7cc6d8fd96df5b177eaf18 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 8 Feb 2022 21:33:01 +0100 Subject: [PATCH] Fix a typo (occured => occurred) Reported: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1005195 --- clang/include/clang-c/Index.h | 2 +- clang/include/clang/Analysis/Analyses/CalledOnceCheck.h | 2 +- clang/include/clang/Basic/AttrDocs.td | 4 ++-- clang/include/clang/Basic/Specifiers.h | 2 +- clang/include/clang/CrossTU/CrossTranslationUnit.h | 2 +- clang/include/clang/Format/Format.h | 2 +- clang/include/clang/Sema/Sema.h | 6 +++--- clang/lib/Sema/SemaOpenMP.cpp | 2 +- clang/lib/StaticAnalyzer/Core/RegionStore.cpp | 2 +- clang/lib/StaticAnalyzer/Core/TextDiagnostics.cpp | 2 +- clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp | 2 +- llvm/include/llvm/ADT/IntrusiveRefCntPtr.h | 4 ++-- llvm/include/llvm/CodeGen/ISDOpcodes.h | 2 +- llvm/include/llvm/Support/MathExtras.h | 2 +- llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp | 2 +- llvm/lib/TableGen/TGLexer.h | 4 ++-- llvm/lib/Transforms/IPO/Attributor.cpp | 2 +- llvm/test/Transforms/LowerConstantIntrinsics/stale-worklist-phi.ll | 2 +- llvm/utils/reduce_pipeline_test/fake_opt.py | 2 +- 19 files changed, 24 insertions(+), 24 deletions(-) diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index b0d7ef5..ea44673 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -3900,7 +3900,7 @@ enum CXTypeNullabilityKind { /** * Generally behaves like Nullable, except when used in a block parameter that * was imported into a swift async method. There, swift will assume that the - * parameter can get null even if no error occured. _Nullable parameters are + * parameter can get null even if no error occurred. _Nullable parameters are * assumed to only get null on error. */ CXTypeNullability_NullableResult = 4 diff --git a/clang/include/clang/Analysis/Analyses/CalledOnceCheck.h b/clang/include/clang/Analysis/Analyses/CalledOnceCheck.h index 6d78fa4..b65a396 100644 --- a/clang/include/clang/Analysis/Analyses/CalledOnceCheck.h +++ b/clang/include/clang/Analysis/Analyses/CalledOnceCheck.h @@ -79,7 +79,7 @@ public: /// the path containing the call and not containing the call. This helps us /// to pinpoint a bad path for the user. /// \param Parameter -- parameter that should be called once. - /// \param Function -- function declaration where the problem occured. + /// \param Function -- function declaration where the problem occurred. /// \param Where -- the least common ancestor statement. /// \param Reason -- a reason describing the path without a call. /// \param IsCalledDirectly -- true, if parameter actually gets called on diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td index 1682a71..74ee5f8 100644 --- a/clang/include/clang/Basic/AttrDocs.td +++ b/clang/include/clang/Basic/AttrDocs.td @@ -3816,10 +3816,10 @@ completion handler in a Swift async method. For instance, here: This method asynchronously calls ``completionHandler`` when the data is available, or calls it with an error. ``_Nullable_result`` indicates to the Swift importer that this is the uncommon case where ``result`` can get ``nil`` -even if no error has occured, and will therefore import it as a Swift optional +even if no error has occurred, and will therefore import it as a Swift optional type. Otherwise, if ``result`` was annotated with ``_Nullable``, the Swift importer will assume that ``result`` will always be non-nil unless an error -occured. +occurred. }]; } diff --git a/clang/include/clang/Basic/Specifiers.h b/clang/include/clang/Basic/Specifiers.h index 82b3c1f..52ca7cc 100644 --- a/clang/include/clang/Basic/Specifiers.h +++ b/clang/include/clang/Basic/Specifiers.h @@ -324,7 +324,7 @@ namespace clang { Unspecified, // Generally behaves like Nullable, except when used in a block parameter // that was imported into a swift async method. There, swift will assume - // that the parameter can get null even if no error occured. _Nullable + // that the parameter can get null even if no error occurred. _Nullable // parameters are assumed to only get null on error. NullableResult, }; diff --git a/clang/include/clang/CrossTU/CrossTranslationUnit.h b/clang/include/clang/CrossTU/CrossTranslationUnit.h index d9f9c51..a09826f 100644 --- a/clang/include/clang/CrossTU/CrossTranslationUnit.h +++ b/clang/include/clang/CrossTU/CrossTranslationUnit.h @@ -291,7 +291,7 @@ private: /// \param DisplayCTUProgress Display a message about loading new ASTs. /// /// \return An Expected instance which contains the ASTUnit pointer or the - /// error occured during the load. + /// error occurred during the load. llvm::Expected getASTUnitForFunction(StringRef FunctionName, StringRef CrossTUDir, StringRef IndexName, diff --git a/clang/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h index ee90a64..d4e859f 100644 --- a/clang/include/clang/Format/Format.h +++ b/clang/include/clang/Format/Format.h @@ -4062,7 +4062,7 @@ bool getPredefinedStyle(StringRef Name, FormatStyle::LanguageKind Language, /// document, are retained in \p Style. /// /// If AllowUnknownOptions is true, no errors are emitted if unknown -/// format options are occured. +/// format options are occurred. /// /// If set all diagnostics are emitted through the DiagHandler. std::error_code diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index 6e97101..c1e846c 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -6960,7 +6960,7 @@ public: /// \brief Check whether the given non-dependent constraint expression is /// satisfied. Returns false and updates Satisfaction with the satisfaction /// verdict if successful, emits a diagnostic and returns true if an error - /// occured and satisfaction could not be determined. + /// occurred and satisfaction could not be determined. /// /// \returns true if an error occurred, false otherwise. bool CheckConstraintSatisfaction(const Expr *ConstraintExpr, @@ -6969,7 +6969,7 @@ public: /// Check whether the given function decl's trailing requires clause is /// satisfied, if any. Returns false and updates Satisfaction with the /// satisfaction verdict if successful, emits a diagnostic and returns true if - /// an error occured and satisfaction could not be determined. + /// an error occurred and satisfaction could not be determined. /// /// \returns true if an error occurred, false otherwise. bool CheckFunctionConstraints(const FunctionDecl *FD, @@ -7915,7 +7915,7 @@ public: /// contain the converted forms of the template arguments as written. /// Otherwise, \p TemplateArgs will not be modified. /// - /// \param ConstraintsNotSatisfied If provided, and an error occured, will + /// \param ConstraintsNotSatisfied If provided, and an error occurred, will /// receive true if the cause for the error is the associated constraints of /// the template not being satisfied by the template arguments. /// diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index ae54148..79823fc 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -5391,7 +5391,7 @@ static CapturedStmt *buildDistanceFunc(Sema &Actions, QualType LogicalTy, // the step size, rounding-up the effective upper bound ensures that the // last iteration is included. // Note that the rounding-up may cause an overflow in a temporry that - // could be avoided, but would have occured in a C-style for-loop as well. + // could be avoided, but would have occurred in a C-style for-loop as well. Expr *Divisor = BuildVarRef(NewStep); if (Rel == BO_GE || Rel == BO_GT) Divisor = diff --git a/clang/lib/StaticAnalyzer/Core/RegionStore.cpp b/clang/lib/StaticAnalyzer/Core/RegionStore.cpp index 135130b..cad5f66 100644 --- a/clang/lib/StaticAnalyzer/Core/RegionStore.cpp +++ b/clang/lib/StaticAnalyzer/Core/RegionStore.cpp @@ -1789,7 +1789,7 @@ Optional RegionStoreManager::getConstantValFromConstArrayInitializer( SmallVector Extents = getConstantArrayExtents(CAT); // The number of offsets should equal to the numbers of extents, - // otherwise wrong type punning occured. For instance: + // otherwise wrong type punning occurred. For instance: // int arr[1][2][3]; // auto ptr = (int(*)[42])arr; // auto x = ptr[4][2]; // UB diff --git a/clang/lib/StaticAnalyzer/Core/TextDiagnostics.cpp b/clang/lib/StaticAnalyzer/Core/TextDiagnostics.cpp index 4f3be7c..48c82cf 100644 --- a/clang/lib/StaticAnalyzer/Core/TextDiagnostics.cpp +++ b/clang/lib/StaticAnalyzer/Core/TextDiagnostics.cpp @@ -129,7 +129,7 @@ public: Rewriter Rewrite(SM, LO); if (!applyAllReplacements(Repls, Rewrite)) { - llvm::errs() << "An error occured during applying fix-it.\n"; + llvm::errs() << "An error occurred during applying fix-it.\n"; } Rewrite.overwriteChangedFiles(); diff --git a/clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp b/clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp index ce67362..07083bf 100644 --- a/clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp +++ b/clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp @@ -1290,7 +1290,7 @@ static Error UnbundleArchive() { } // End of processing of all bundle entries of this child of input archive. } // End of while over children of input archive. - assert(!ArchiveErr && "Error occured while reading archive!"); + assert(!ArchiveErr && "Error occurred while reading archive!"); /// Write out an archive for each target for (auto &Target : TargetNames) { diff --git a/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h b/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h index 975535b..e41eb06 100644 --- a/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h +++ b/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h @@ -84,7 +84,7 @@ protected: #ifndef NDEBUG ~RefCountedBase() { assert(RefCount == 0 && - "Destruction occured when there are still references to this."); + "Destruction occurred when there are still references to this."); } #else // Default the destructor in release builds, A trivial destructor may enable @@ -115,7 +115,7 @@ protected: #ifndef NDEBUG ~ThreadSafeRefCountedBase() { assert(RefCount == 0 && - "Destruction occured when there are still references to this."); + "Destruction occurred when there are still references to this."); } #else // Default the destructor in release builds, A trivial destructor may enable diff --git a/llvm/include/llvm/CodeGen/ISDOpcodes.h b/llvm/include/llvm/CodeGen/ISDOpcodes.h index b07c7cd..9fedb53 100644 --- a/llvm/include/llvm/CodeGen/ISDOpcodes.h +++ b/llvm/include/llvm/CodeGen/ISDOpcodes.h @@ -294,7 +294,7 @@ enum NodeType { /// subtraction. These nodes take three operands: The first two are normal lhs /// and rhs to the add or sub, and the third is a boolean indicating if there /// is an incoming carry. They produce two results: the normal result of the - /// add or sub, and a boolean that indicates if an overflow occured (*not* + /// add or sub, and a boolean that indicates if an overflow occurred (*not* /// flag, because it may be a store to memory, etc.). If the type of the /// boolean is not i1 then the high bits conform to getBooleanContents. SADDO_CARRY, diff --git a/llvm/include/llvm/Support/MathExtras.h b/llvm/include/llvm/Support/MathExtras.h index ccb0f55..604d709 100644 --- a/llvm/include/llvm/Support/MathExtras.h +++ b/llvm/include/llvm/Support/MathExtras.h @@ -906,7 +906,7 @@ extern const float huge_valf; /// Add two signed integers, computing the two's complement truncated result, -/// returning true if overflow occured. +/// returning true if overflow occurred. template std::enable_if_t::value, T> AddOverflow(T X, T Y, T &Result) { #if __has_builtin(__builtin_add_overflow) diff --git a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp index eed0a60..1f45d3e 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp @@ -407,7 +407,7 @@ void DWARFUnit::extractDIEsToVector( assert((Parents.back() == UINT32_MAX || Parents.back() <= Dies.size()) && "Wrong parent index"); - // Extract die. Stop if any error occured. + // Extract die. Stop if any error occurred. if (!DIE.extractFast(*this, &DIEOffset, DebugInfoData, NextCUOffset, Parents.back())) break; diff --git a/llvm/lib/TableGen/TGLexer.h b/llvm/lib/TableGen/TGLexer.h index 857ba09..db05bf0 100644 --- a/llvm/lib/TableGen/TGLexer.h +++ b/llvm/lib/TableGen/TGLexer.h @@ -337,7 +337,7 @@ private: // // The method returns true upon reaching the first non-whitespace symbol // or EOF, CurPtr is set to point to this symbol. The method returns false, - // if an error occured during skipping of a C-style comment. + // if an error occurred during skipping of a C-style comment. bool prepSkipLineBegin(); // Skip any whitespaces or comments after a preprocessing directive. @@ -345,7 +345,7 @@ private: // or end of the file. If there is a multiline C-style comment // after the preprocessing directive, the method skips // the comment, so the final CurPtr may point to one of the next lines. - // The method returns false, if an error occured during skipping + // The method returns false, if an error occurred during skipping // C- or C++-style comment, or a non-whitespace symbol appears // after the preprocessing directive. // diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp index 70db801..e0f2242 100644 --- a/llvm/lib/Transforms/IPO/Attributor.cpp +++ b/llvm/lib/Transforms/IPO/Attributor.cpp @@ -991,7 +991,7 @@ Attributor::getAssumedSimplified(const IRPosition &IRP, for (auto &CB : SimplificationCallbacks.lookup(IRP)) return CB(IRP, AA, UsedAssumedInformation); - // If no high-level/outside simplification occured, use AAValueSimplify. + // If no high-level/outside simplification occurred, use AAValueSimplify. const auto &ValueSimplifyAA = getOrCreateAAFor(IRP, AA, DepClassTy::NONE); Optional SimplifiedV = diff --git a/llvm/test/Transforms/LowerConstantIntrinsics/stale-worklist-phi.ll b/llvm/test/Transforms/LowerConstantIntrinsics/stale-worklist-phi.ll index 304e865..0390116 100644 --- a/llvm/test/Transforms/LowerConstantIntrinsics/stale-worklist-phi.ll +++ b/llvm/test/Transforms/LowerConstantIntrinsics/stale-worklist-phi.ll @@ -1,6 +1,6 @@ ; RUN: opt -lower-constant-intrinsics -S < %s | FileCheck %s -; This is a reproducer for a heap-use-after-free bug that occured due to trying +; This is a reproducer for a heap-use-after-free bug that occurred due to trying ; to process a PHI node that was removed in a preceding worklist iteration. The ; conditional branch in %cont2.i will be replaced with an unconditional branch ; to %cont4.i. As a result of that, the PHI node in %handler.type_mismatch3.i diff --git a/llvm/utils/reduce_pipeline_test/fake_opt.py b/llvm/utils/reduce_pipeline_test/fake_opt.py index ca66199..8027d04 100755 --- a/llvm/utils/reduce_pipeline_test/fake_opt.py +++ b/llvm/utils/reduce_pipeline_test/fake_opt.py @@ -67,7 +67,7 @@ if len(crash_seq) > 0 and crash_seq[0] == tok: if args.output: shutil.copy(args.input, args.output) -# Crash if all 'crash_seq' passes occured in right order. +# Crash if all 'crash_seq' passes occurred in right order. if len(crash_seq) == 0: print('crash') os.kill(os.getpid(), signal.SIGKILL) -- 2.7.4