Skip to content

Commit 87b4b64

Browse files
committed
Fix a typo in CheckExprLifetime.cpp, NFC
1 parent 95684af commit 87b4b64

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clang/lib/Sema/CheckExprLifetime.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ static bool shouldTrackFirstArgument(const FunctionDecl *FD) {
328328
// We assuments that a normal assingment operator always returns *this, that is,
329329
// an lvalue reference that is the same type as the implicit object parameter
330330
// (or the LHS for a non-member operator$=).
331-
static bool isNormalAsisgnmentOperator(const FunctionDecl *FD) {
331+
static bool isNormalAssignmentOperator(const FunctionDecl *FD) {
332332
OverloadedOperatorKind OO = FD->getDeclName().getCXXOverloadedOperator();
333333
if (OO == OO_Equal || isCompoundAssignmentOperator(OO)) {
334334
QualType RetT = FD->getReturnType();
@@ -362,7 +362,7 @@ static bool implicitObjectParamIsLifetimeBound(const FunctionDecl *FD) {
362362
return true;
363363
}
364364

365-
return isNormalAsisgnmentOperator(FD);
365+
return isNormalAssignmentOperator(FD);
366366
}
367367

368368
// Visit lifetimebound or gsl-pointer arguments.
@@ -940,10 +940,10 @@ static bool pathOnlyHandlesGslPointer(IndirectLocalPath &Path) {
940940
return false;
941941
}
942942

943-
static bool isAssginmentOperatorLifetimeBound(CXXMethodDecl *CMD) {
943+
static bool isAssignmentOperatorLifetimeBound(CXXMethodDecl *CMD) {
944944
if (!CMD)
945945
return false;
946-
return isNormalAsisgnmentOperator(CMD) && CMD->param_size() == 1 &&
946+
return isNormalAssignmentOperator(CMD) && CMD->param_size() == 1 &&
947947
CMD->getParamDecl(0)->hasAttr<LifetimeBoundAttr>();
948948
}
949949

@@ -953,7 +953,7 @@ static bool shouldRunGSLAssignmentAnalysis(const Sema &SemaRef,
953953
diag::warn_dangling_lifetime_pointer_assignment, SourceLocation());
954954
return (EnableGSLAssignmentWarnings &&
955955
(isRecordWithAttr<PointerAttr>(Entity.LHS->getType()) ||
956-
isAssginmentOperatorLifetimeBound(Entity.AssignmentOperator)));
956+
isAssignmentOperatorLifetimeBound(Entity.AssignmentOperator)));
957957
}
958958

959959
static void checkExprLifetimeImpl(Sema &SemaRef,

0 commit comments

Comments
 (0)