[clang] [libc] [llvm] Fix typos (PR #88565)

2024-04-12 Thread Victor Toni via cfe-commits

ViToni wrote:

@nickdesaulniers Please. I wouldn't assume to have any permissions in this repo.

https://github.com/llvm/llvm-project/pull/88565
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [libc] [llvm] Fix typos (PR #88565)

2024-04-12 Thread Victor Toni via cfe-commits

https://github.com/ViToni created 
https://github.com/llvm/llvm-project/pull/88565

None

>From 7e172bc788e3434b27bd2a6712b24d206b92628f Mon Sep 17 00:00:00 2001
From: Victor Toni 
Date: Fri, 12 Apr 2024 21:17:12 +0200
Subject: [PATCH] Fix typos

---
 clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | 2 +-
 libc/src/__support/str_to_float.h   | 8 
 llvm/lib/Analysis/LoopCacheAnalysis.cpp | 2 +-
 llvm/lib/Support/APInt.cpp  | 2 +-
 llvm/lib/Transforms/Scalar/LoopInterchange.cpp  | 2 +-
 llvm/test/Transforms/JumpThreading/free_instructions.ll | 2 +-
 llvm/utils/lint/common_lint.py  | 2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp 
b/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
index 504fd7f05e0f99..c50db1e0e2f863 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
@@ -229,7 +229,7 @@ SVal ExprEngine::computeObjectUnderConstruction(
 // We are on the top frame of the analysis. We do not know where is the
 // object returned to. Conjure a symbolic region for the return value.
 // TODO: We probably need a new MemRegion kind to represent the storage
-// of that SymbolicRegion, so that we cound produce a fancy symbol
+// of that SymbolicRegion, so that we could produce a fancy symbol
 // instead of an anonymous conjured symbol.
 // TODO: Do we need to track the region to avoid having it dead
 // too early? It does die too early, at least in C++17, but because
diff --git a/libc/src/__support/str_to_float.h 
b/libc/src/__support/str_to_float.h
index cd0c07629f8766..fa466ca8492fc4 100644
--- a/libc/src/__support/str_to_float.h
+++ b/libc/src/__support/str_to_float.h
@@ -695,10 +695,10 @@ LIBC_INLINE FloatConvertReturn decimal_exp_to_float(
 // If the mantissa is truncated, then the result may be off by the LSB, so
 // check if rounding the mantissa up changes the result. If not, then it's
 // safe, else use the fallback.
-auto secound_output = eisel_lemire({mantissa + 1, exp10}, round);
-if (secound_output.has_value()) {
-  if (opt_output->mantissa == secound_output->mantissa &&
-  opt_output->exponent == secound_output->exponent) {
+auto second_output = eisel_lemire({mantissa + 1, exp10}, round);
+if (second_output.has_value()) {
+  if (opt_output->mantissa == second_output->mantissa &&
+  opt_output->exponent == second_output->exponent) {
 return {opt_output.value(), 0};
   }
 }
diff --git a/llvm/lib/Analysis/LoopCacheAnalysis.cpp 
b/llvm/lib/Analysis/LoopCacheAnalysis.cpp
index c3a56639b5c8f8..284d8d16d264e9 100644
--- a/llvm/lib/Analysis/LoopCacheAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopCacheAnalysis.cpp
@@ -315,7 +315,7 @@ CacheCostTy IndexedReference::computeRefCost(const Loop ,
 RefCost = TripCount;
 
 int Index = getSubscriptIndex(L);
-assert(Index >= 0 && "Cound not locate a valid Index");
+assert(Index >= 0 && "Could not locate a valid Index");
 
 for (unsigned I = Index + 1; I < getNumSubscripts() - 1; ++I) {
   const SCEVAddRecExpr *AR = dyn_cast(getSubscript(I));
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index 8825025ec32134..40622301f7d95d 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/lib/Support/APInt.cpp
@@ -2660,7 +2660,7 @@ int APInt::tcDivide(WordType *lhs, const WordType *rhs,
   return false;
 }
 
-/// Shift a bignum left Cound bits in-place. Shifted in bits are zero. There 
are
+/// Shift a bignum left Count bits in-place. Shifted in bits are zero. There 
are
 /// no restrictions on Count.
 void APInt::tcShiftLeft(WordType *Dst, unsigned Words, unsigned Count) {
   // Don't bother performing a no-op shift.
diff --git a/llvm/lib/Transforms/Scalar/LoopInterchange.cpp 
b/llvm/lib/Transforms/Scalar/LoopInterchange.cpp
index 277f530ee25fc1..400973fd9fc915 100644
--- a/llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopInterchange.cpp
@@ -976,7 +976,7 @@ bool LoopInterchangeLegality::canInterchangeLoops(unsigned 
InnerLoopId,
   }
 
   if (!findInductions(InnerLoop, InnerLoopInductions)) {
-LLVM_DEBUG(dbgs() << "Cound not find inner loop induction variables.\n");
+LLVM_DEBUG(dbgs() << "Could not find inner loop induction variables.\n");
 return false;
   }
 
diff --git a/llvm/test/Transforms/JumpThreading/free_instructions.ll 
b/llvm/test/Transforms/JumpThreading/free_instructions.ll
index 3485bf8c98da86..48bedc72c2d312 100644
--- a/llvm/test/Transforms/JumpThreading/free_instructions.ll
+++ b/llvm/test/Transforms/JumpThreading/free_instructions.ll
@@ -1,7 +1,7 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt -S -passes=jump-threading -jump-threading-threshold=3 < %s | 
FileCheck