Skip to content

[NFC] Fix assignment typo. #151864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 3, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Sema/SemaHLSL.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion clang/test/SemaCXX/warn-self-assign-builtin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
2 changes: 1 addition & 1 deletion clang/test/SemaCXX/warn-self-assign-field-builtin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
2 changes: 1 addition & 1 deletion clang/test/SemaCXX/warn-self-assign-field-overloaded.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion clang/test/SemaCXX/warn-self-assign-overloaded.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion clang/unittests/Format/FormatTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion flang-rt/include/flang-rt/runtime/type-info.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Lower/ConvertExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Lower/OpenACC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions flang/lib/Semantics/check-omp-atomic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lldb/unittests/Utility/ScalarTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Loading