[clang] b869f1b - [clang] Remove unused lambda capture (NFC)

Jie Fu via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 28 02:27:10 PST 2024


Author: Jie Fu
Date: 2024-11-28T18:25:30+08:00
New Revision: b869f1bd4fc96fd1d2038720bd1ca84788d71370

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

LOG: [clang] Remove unused lambda capture (NFC)

/llvm-project/clang/lib/Basic/Targets/X86.cpp:1368:23:
error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
  auto getPriority = [this](StringRef Feature) -> unsigned {
                      ^~~~
1 error generated.

Added: 
    

Modified: 
    clang/lib/Basic/Targets/X86.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp
index 38714d0e7d3c51..8c31bbe0567416 100644
--- a/clang/lib/Basic/Targets/X86.cpp
+++ b/clang/lib/Basic/Targets/X86.cpp
@@ -1365,7 +1365,7 @@ static llvm::X86::ProcessorFeatures getFeature(StringRef Name) {
 }
 
 unsigned X86TargetInfo::getFMVPriority(ArrayRef<StringRef> Features) const {
-  auto getPriority = [this](StringRef Feature) -> unsigned {
+  auto getPriority = [](StringRef Feature) -> unsigned {
     // Valid CPUs have a 'key feature' that compares just better than its key
     // feature.
     using namespace llvm::X86;


        


More information about the cfe-commits mailing list