Author: Kazu Hirata
Date: 2025-04-01T21:58:32-07:00
New Revision: e060acbd3b0fe362b81b7edd8741eee854aa3d99

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

LOG: [Sema] Use llvm::erase_if (NFC) (#134017)

Added: 
    

Modified: 
    clang/lib/Sema/TreeTransform.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index e455b225d7f49..916b8e2735cd0 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -11963,10 +11963,10 @@ void 
OpenACCClauseTransform<Derived>::VisitAttachClause(
   llvm::SmallVector<Expr *> VarList = VisitVarList(C.getVarList());
 
   // Ensure each var is a pointer type.
-  VarList.erase(std::remove_if(VarList.begin(), VarList.end(), [&](Expr *E) {
+  llvm::erase_if(VarList, [&](Expr *E) {
     return Self.getSema().OpenACC().CheckVarIsPointerType(
         OpenACCClauseKind::Attach, E);
-  }), VarList.end());
+  });
 
   ParsedClause.setVarListDetails(VarList,
                                  /*IsReadOnly=*/false, /*IsZero=*/false);
@@ -12026,10 +12026,10 @@ void 
OpenACCClauseTransform<Derived>::VisitDevicePtrClause(
   llvm::SmallVector<Expr *> VarList = VisitVarList(C.getVarList());
 
   // Ensure each var is a pointer type.
-  VarList.erase(std::remove_if(VarList.begin(), VarList.end(), [&](Expr *E) {
+  llvm::erase_if(VarList, [&](Expr *E) {
     return Self.getSema().OpenACC().CheckVarIsPointerType(
         OpenACCClauseKind::DevicePtr, E);
-  }), VarList.end());
+  });
 
   ParsedClause.setVarListDetails(VarList,
                                  /*IsReadOnly=*/false, /*IsZero=*/false);


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

Reply via email to