[clang] [clang-tools-extra] [flang] [lldb] [llvm] [NFC] Fix `assignment` typo. (PR #151864)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 3 05:56:55 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-fir-hlfir
@llvm/pr-subscribers-clang
Author: Connector Switch (c8ef)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/151864.diff
15 Files Affected:
- (modified) clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param.cpp (+2-2)
- (modified) clang/include/clang/Sema/SemaHLSL.h (+1-1)
- (modified) clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp (+1-1)
- (renamed) clang/test/Interpreter/assignment-with-implicit-ctor.cpp ()
- (modified) clang/test/SemaCXX/warn-self-assign-builtin.cpp (+1-1)
- (modified) clang/test/SemaCXX/warn-self-assign-field-builtin.cpp (+1-1)
- (modified) clang/test/SemaCXX/warn-self-assign-field-overloaded.cpp (+1-1)
- (modified) clang/test/SemaCXX/warn-self-assign-overloaded.cpp (+1-1)
- (modified) clang/unittests/Format/FormatTest.cpp (+1-1)
- (modified) flang-rt/include/flang-rt/runtime/type-info.h (+1-1)
- (modified) flang/lib/Lower/ConvertExpr.cpp (+1-1)
- (modified) flang/lib/Lower/OpenACC.cpp (+1-1)
- (modified) flang/lib/Semantics/check-omp-atomic.cpp (+2-2)
- (modified) lldb/unittests/Utility/ScalarTest.cpp (+1-1)
- (modified) llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp (+2-2)
``````````diff
diff --git a/clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param.cpp b/clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param.cpp
index 88c491ea1eabc..a9b7afef489fe 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-value-param.cpp
@@ -285,9 +285,9 @@ struct NotCopyAssigned {
NotCopyAssigned &operator=(const ExpensiveMovableType &);
};
-void PositiveNoMoveForNonCopyAssigmentOperator(ExpensiveMovableType E) {
+void PositiveNoMoveForNonCopyAssignmentOperator(ExpensiveMovableType E) {
// CHECK-MESSAGES: [[@LINE-1]]:69: warning: the parameter 'E' is copied
- // CHECK-FIXES: void PositiveNoMoveForNonCopyAssigmentOperator(const ExpensiveMovableType& E) {
+ // CHECK-FIXES: void PositiveNoMoveForNonCopyAssignmentOperator(const ExpensiveMovableType& E) {
NotCopyAssigned N;
N = E;
}
diff --git a/clang/include/clang/Sema/SemaHLSL.h b/clang/include/clang/Sema/SemaHLSL.h
index c0da80a70bb82..116f568daf617 100644
--- a/clang/include/clang/Sema/SemaHLSL.h
+++ b/clang/include/clang/Sema/SemaHLSL.h
@@ -84,7 +84,7 @@ struct DeclBindingInfo {
// ResourceBindings class stores information about all resource bindings
// in a shader. It is used for binding diagnostics and implicit binding
-// assigments.
+// assignments.
class ResourceBindings {
public:
DeclBindingInfo *addDeclBindingInfo(const VarDecl *VD,
diff --git a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp
index cad42014802e7..15cb15334675e 100644
--- a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp
+++ b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp
@@ -46,7 +46,7 @@ const auto S::c = 0;
namespace std { template<typename T> struct initializer_list { const T *a, *b; initializer_list(); }; }
// In an initializer of the form ( expression-list ), the expression-list
-// shall be a single assigment-expression.
+// shall be a single assignment-expression.
auto parens1(1);
auto parens2(2, 3); // expected-error {{initializer for variable 'parens2' with type 'auto' contains multiple expressions}}
#if __cplusplus >= 201103L
diff --git a/clang/test/Interpreter/assigment-with-implicit-ctor.cpp b/clang/test/Interpreter/assignment-with-implicit-ctor.cpp
similarity index 100%
rename from clang/test/Interpreter/assigment-with-implicit-ctor.cpp
rename to clang/test/Interpreter/assignment-with-implicit-ctor.cpp
diff --git a/clang/test/SemaCXX/warn-self-assign-builtin.cpp b/clang/test/SemaCXX/warn-self-assign-builtin.cpp
index 5211accce79d3..fe5d9802b4243 100644
--- a/clang/test/SemaCXX/warn-self-assign-builtin.cpp
+++ b/clang/test/SemaCXX/warn-self-assign-builtin.cpp
@@ -48,7 +48,7 @@ void false_positives() {
vol_a_ref = vol_a_ref;
}
-// Do not diagnose self-assigment in an unevaluated context
+// Do not diagnose self-assignment in an unevaluated context
void false_positives_unevaluated_ctx(int a) noexcept(noexcept(a = a)) // expected-warning {{expression with side effects has no effect in an unevaluated context}}
{
decltype(a = a) b = a; // expected-warning {{expression with side effects has no effect in an unevaluated context}}
diff --git a/clang/test/SemaCXX/warn-self-assign-field-builtin.cpp b/clang/test/SemaCXX/warn-self-assign-field-builtin.cpp
index 57526242833ed..b3d205d5209e9 100644
--- a/clang/test/SemaCXX/warn-self-assign-field-builtin.cpp
+++ b/clang/test/SemaCXX/warn-self-assign-field-builtin.cpp
@@ -52,7 +52,7 @@ struct C {
a = (int &)a;
}
- // Do not diagnose self-assigment in an unevaluated context
+ // Do not diagnose self-assignment in an unevaluated context
void false_positives_unevaluated_ctx() noexcept(noexcept(a = a)) // expected-warning {{expression with side effects has no effect in an unevaluated context}}
{
decltype(a = a) b = a; // expected-warning {{expression with side effects has no effect in an unevaluated context}}
diff --git a/clang/test/SemaCXX/warn-self-assign-field-overloaded.cpp b/clang/test/SemaCXX/warn-self-assign-field-overloaded.cpp
index c9cec8e406fc4..7141bc10a8f97 100644
--- a/clang/test/SemaCXX/warn-self-assign-field-overloaded.cpp
+++ b/clang/test/SemaCXX/warn-self-assign-field-overloaded.cpp
@@ -100,7 +100,7 @@ struct C {
#endif
};
-// Do not diagnose self-assigment in an unevaluated context
+// Do not diagnose self-assignment in an unevaluated context
struct SNoExcept {
SNoExcept() = default;
SNoExcept &operator=(const SNoExcept &) noexcept;
diff --git a/clang/test/SemaCXX/warn-self-assign-overloaded.cpp b/clang/test/SemaCXX/warn-self-assign-overloaded.cpp
index 428797ae40cd0..caa3a8264529b 100644
--- a/clang/test/SemaCXX/warn-self-assign-overloaded.cpp
+++ b/clang/test/SemaCXX/warn-self-assign-overloaded.cpp
@@ -93,7 +93,7 @@ void false_positives() {
#endif
}
-// Do not diagnose self-assigment in an unevaluated context
+// Do not diagnose self-assignment in an unevaluated context
struct SNoExcept {
SNoExcept() = default;
SNoExcept &operator=(const SNoExcept &) noexcept;
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 9c5aa11d6e58f..96cc650f52a5d 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -7558,7 +7558,7 @@ TEST_F(FormatTest, NoOperandAlignment) {
Style);
}
-TEST_F(FormatTest, BreakingBeforeNonAssigmentOperators) {
+TEST_F(FormatTest, BreakingBeforeNonAssignmentOperators) {
FormatStyle Style = getLLVMStyle();
Style.BreakBeforeBinaryOperators = FormatStyle::BOS_NonAssignment;
verifyFormat("int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =\n"
diff --git a/flang-rt/include/flang-rt/runtime/type-info.h b/flang-rt/include/flang-rt/runtime/type-info.h
index 93bca24a602b4..e0fbcd3cbfa06 100644
--- a/flang-rt/include/flang-rt/runtime/type-info.h
+++ b/flang-rt/include/flang-rt/runtime/type-info.h
@@ -179,7 +179,7 @@ class SpecialBinding {
// The passed-object argument (usually the "to") is always passed via a
// a descriptor in the cases where the runtime will call a defined
// assignment because these calls are to type-bound generics,
- // not generic interfaces, and type-bound generic defined assigment
+ // not generic interfaces, and type-bound generic defined assignment
// may appear only in an extensible type and requires a passed-object
// argument (see C774), and passed-object arguments to TBPs must be
// both polymorphic and scalar (C760). The non-passed-object argument
diff --git a/flang/lib/Lower/ConvertExpr.cpp b/flang/lib/Lower/ConvertExpr.cpp
index 3578f941ec1b4..33df654b24a54 100644
--- a/flang/lib/Lower/ConvertExpr.cpp
+++ b/flang/lib/Lower/ConvertExpr.cpp
@@ -3805,7 +3805,7 @@ class ArrayExprLowering {
const Fortran::lower::SomeExpr &rhs) {
mlir::Location loc = getLoc();
if (rhs.Rank() > 0)
- TODO(loc, "user-defined elemental assigment from expression with rank");
+ TODO(loc, "user-defined elemental assignment from expression with rank");
// 1) Lower the rhs expression with array_fetch op(s).
IterationSpace iters;
iters.setElement(genarr(rhs)(iters));
diff --git a/flang/lib/Lower/OpenACC.cpp b/flang/lib/Lower/OpenACC.cpp
index 57ce1d374b496..35edcb0926b69 100644
--- a/flang/lib/Lower/OpenACC.cpp
+++ b/flang/lib/Lower/OpenACC.cpp
@@ -383,7 +383,7 @@ static inline void
genAtomicCaptureStatement(Fortran::lower::AbstractConverter &converter,
mlir::Value fromAddress, mlir::Value toAddress,
mlir::Type elementType, mlir::Location loc) {
- // Generate `atomic.read` operation for atomic assigment statements
+ // Generate `atomic.read` operation for atomic assignment statements
fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder();
mlir::acc::AtomicReadOp::create(firOpBuilder, loc, fromAddress, toAddress,
diff --git a/flang/lib/Semantics/check-omp-atomic.cpp b/flang/lib/Semantics/check-omp-atomic.cpp
index eca50c127a8ad..a5fdabf0b103c 100644
--- a/flang/lib/Semantics/check-omp-atomic.cpp
+++ b/flang/lib/Semantics/check-omp-atomic.cpp
@@ -448,7 +448,7 @@ OmpStructureChecker::CheckUpdateCapture(
// If det != 0, then the checks unambiguously suggest a specific
// categorization.
// If det == 0, then this function should be called only if the
- // checks haven't ruled out any possibility, i.e. when both assigments
+ // checks haven't ruled out any possibility, i.e. when both assignments
// could still be either updates or captures.
if (det > 0) {
// as1 is update, as2 is capture
@@ -508,7 +508,7 @@ OmpStructureChecker::CheckUpdateCapture(
// The remaining cases are that
// - no candidate for update, or for capture,
- // - one of the assigments cannot be anything.
+ // - one of the assignments cannot be anything.
if (!cbu1 && !cbu2) {
context_.Say(source,
diff --git a/lldb/unittests/Utility/ScalarTest.cpp b/lldb/unittests/Utility/ScalarTest.cpp
index 500cb8bb2286e..65b9783b9416f 100644
--- a/lldb/unittests/Utility/ScalarTest.cpp
+++ b/lldb/unittests/Utility/ScalarTest.cpp
@@ -303,7 +303,7 @@ TEST(ScalarTest, GetValue) {
ScalarGetValue(std::numeric_limits<unsigned long long>::max()));
}
-TEST(ScalarTest, LongLongAssigmentOperator) {
+TEST(ScalarTest, LongLongAssignmentOperator) {
Scalar ull;
ull = std::numeric_limits<unsigned long long>::max();
EXPECT_EQ(std::numeric_limits<unsigned long long>::max(), ull.ULongLong());
diff --git a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
index ff265b505b5da..260ce8fb7aae0 100644
--- a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
+++ b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
@@ -1403,7 +1403,7 @@ void AssignmentTrackingLowering::addMemDef(BlockInfo *LiveSet, VariableID Var,
const Assignment &AV) {
LiveSet->setAssignment(BlockInfo::Stack, Var, AV);
- // Use this assigment for all fragments contained within Var, but do not
+ // Use this assignment for all fragments contained within Var, but do not
// provide a Source because we cannot convert Var's value to a value for the
// fragment.
Assignment FragAV = AV;
@@ -1416,7 +1416,7 @@ void AssignmentTrackingLowering::addDbgDef(BlockInfo *LiveSet, VariableID Var,
const Assignment &AV) {
LiveSet->setAssignment(BlockInfo::Debug, Var, AV);
- // Use this assigment for all fragments contained within Var, but do not
+ // Use this assignment for all fragments contained within Var, but do not
// provide a Source because we cannot convert Var's value to a value for the
// fragment.
Assignment FragAV = AV;
``````````
</details>
https://github.com/llvm/llvm-project/pull/151864
More information about the llvm-commits
mailing list