Author: Haojian Wu
Date: 2024-09-05T13:18:39+02:00
New Revision: 87b4b648585f69a2ea148e86543aa31474e59acd

URL: 
https://github.com/llvm/llvm-project/commit/87b4b648585f69a2ea148e86543aa31474e59acd
DIFF: 
https://github.com/llvm/llvm-project/commit/87b4b648585f69a2ea148e86543aa31474e59acd.diff

LOG: Fix a typo in CheckExprLifetime.cpp, NFC

Added: 
    

Modified: 
    clang/lib/Sema/CheckExprLifetime.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/CheckExprLifetime.cpp 
b/clang/lib/Sema/CheckExprLifetime.cpp
index 1482711cc2839e..6ed6b8aaa70400 100644
--- a/clang/lib/Sema/CheckExprLifetime.cpp
+++ b/clang/lib/Sema/CheckExprLifetime.cpp
@@ -328,7 +328,7 @@ static bool shouldTrackFirstArgument(const FunctionDecl 
*FD) {
 // We assuments that a normal assingment operator always returns *this, that 
is,
 // an lvalue reference that is the same type as the implicit object parameter
 // (or the LHS for a non-member operator$=).
-static bool isNormalAsisgnmentOperator(const FunctionDecl *FD) {
+static bool isNormalAssignmentOperator(const FunctionDecl *FD) {
   OverloadedOperatorKind OO = FD->getDeclName().getCXXOverloadedOperator();
   if (OO == OO_Equal || isCompoundAssignmentOperator(OO)) {
     QualType RetT = FD->getReturnType();
@@ -362,7 +362,7 @@ static bool implicitObjectParamIsLifetimeBound(const 
FunctionDecl *FD) {
       return true;
   }
 
-  return isNormalAsisgnmentOperator(FD);
+  return isNormalAssignmentOperator(FD);
 }
 
 // Visit lifetimebound or gsl-pointer arguments.
@@ -940,10 +940,10 @@ static bool pathOnlyHandlesGslPointer(IndirectLocalPath 
&Path) {
   return false;
 }
 
-static bool isAssginmentOperatorLifetimeBound(CXXMethodDecl *CMD) {
+static bool isAssignmentOperatorLifetimeBound(CXXMethodDecl *CMD) {
   if (!CMD)
     return false;
-  return isNormalAsisgnmentOperator(CMD) && CMD->param_size() == 1 &&
+  return isNormalAssignmentOperator(CMD) && CMD->param_size() == 1 &&
          CMD->getParamDecl(0)->hasAttr<LifetimeBoundAttr>();
 }
 
@@ -953,7 +953,7 @@ static bool shouldRunGSLAssignmentAnalysis(const Sema 
&SemaRef,
       diag::warn_dangling_lifetime_pointer_assignment, SourceLocation());
   return (EnableGSLAssignmentWarnings &&
           (isRecordWithAttr<PointerAttr>(Entity.LHS->getType()) ||
-           isAssginmentOperatorLifetimeBound(Entity.AssignmentOperator)));
+           isAssignmentOperatorLifetimeBound(Entity.AssignmentOperator)));
 }
 
 static void checkExprLifetimeImpl(Sema &SemaRef,


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to