[NFC] Fix assignment
typo. (#151864)
This commit is contained in:
parent
fca9f70e42
commit
8b7f81f2de
@ -285,9 +285,9 @@ struct NotCopyAssigned {
|
||||
NotCopyAssigned &operator=(const ExpensiveMovableType &);
|
||||
};
|
||||
|
||||
void PositiveNoMoveForNonCopyAssigmentOperator(ExpensiveMovableType E) {
|
||||
// CHECK-MESSAGES: [[@LINE-1]]:69: warning: the parameter 'E' is copied
|
||||
// CHECK-FIXES: void PositiveNoMoveForNonCopyAssigmentOperator(const ExpensiveMovableType& E) {
|
||||
void PositiveNoMoveForNonCopyAssignmentOperator(ExpensiveMovableType E) {
|
||||
// CHECK-MESSAGES: [[@LINE-1]]:70: warning: the parameter 'E' is copied
|
||||
// CHECK-FIXES: void PositiveNoMoveForNonCopyAssignmentOperator(const ExpensiveMovableType& E) {
|
||||
NotCopyAssigned N;
|
||||
N = E;
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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}}
|
||||
|
@ -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}}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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"
|
||||
|
@ -179,7 +179,7 @@ private:
|
||||
// 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
|
||||
|
@ -3805,7 +3805,7 @@ public:
|
||||
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));
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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());
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user