[clang] 6ed67ca - [clang] Remove unused-lambda-capture in AArch64.cpp (NFC)

Jie Fu via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 1 01:37:56 PST 2024


Author: Jie Fu
Date: 2024-03-01T17:37:11+08:00
New Revision: 6ed67ca14cd05596a8253eeceb247d2743e00f6e

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

LOG: [clang] Remove unused-lambda-capture in AArch64.cpp (NFC)

llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp:886:26:
error: lambda capture 'TI' is not used [-Werror,-Wunused-lambda-capture]
  886 |   llvm::sort(Features, [&TI](const StringRef LHS, const StringRef RHS) {
      |                         ~^~
1 error generated.

Added: 
    

Modified: 
    clang/lib/CodeGen/Targets/AArch64.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/Targets/AArch64.cpp b/clang/lib/CodeGen/Targets/AArch64.cpp
index 79a9c1d5978a14..725e8a70fddfe6 100644
--- a/clang/lib/CodeGen/Targets/AArch64.cpp
+++ b/clang/lib/CodeGen/Targets/AArch64.cpp
@@ -882,8 +882,7 @@ void AArch64ABIInfo::appendAttributeMangling(StringRef AttrStr,
   for (auto &Feat : Features)
     Feat = Feat.trim();
 
-  const TargetInfo &TI = CGT.getTarget();
-  llvm::sort(Features, [&TI](const StringRef LHS, const StringRef RHS) {
+  llvm::sort(Features, [](const StringRef LHS, const StringRef RHS) {
     return LHS.compare(RHS) < 0;
   });
 


        


More information about the cfe-commits mailing list