[clang] 1d1b089 - Fix more unused lambda capture warnings, NFC

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 23 14:09:48 PST 2022


Author: Reid Kleckner
Date: 2022-02-23T14:07:04-08:00
New Revision: 1d1b089c5d503e2fc8697887411730105f66c774

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

LOG: Fix more unused lambda capture warnings, NFC

Added: 
    

Modified: 
    clang/lib/CodeGen/CGOpenMPRuntime.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index b4033da890c4..3f4a78ddbf3c 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -10358,8 +10358,8 @@ void CGOpenMPRuntime::emitTargetCall(
   llvm::Value *MapTypesArray = nullptr;
   llvm::Value *MapNamesArray = nullptr;
   // Generate code for the host fallback function.
-  auto &&FallbackGen = [this, OutlinedFn, &D, &CapturedVars, RequiresOuterTask,
-                        &CS, OffloadingMandatory](CodeGenFunction &CGF) {
+  auto &&FallbackGen = [this, &D, OutlinedFn, &CapturedVars, RequiresOuterTask, &CS,
+                        OffloadingMandatory](CodeGenFunction &CGF) {
     if (OffloadingMandatory) {
       CGF.Builder.CreateUnreachable();
     } else {
@@ -10371,9 +10371,8 @@ void CGOpenMPRuntime::emitTargetCall(
     }
   };
   // Fill up the pointer arrays and transfer execution to the device.
-  auto &&ThenGen = [this, Device, OutlinedFn, OutlinedFnID, &D, &InputInfo,
-                    &MapTypesArray, &MapNamesArray, &CS, RequiresOuterTask,
-                    &CapturedVars, SizeEmitter,
+  auto &&ThenGen = [this, Device, OutlinedFnID, &D, &InputInfo,
+                    &MapTypesArray, &MapNamesArray, SizeEmitter,
                     FallbackGen](CodeGenFunction &CGF, PrePostActionTy &) {
     if (Device.getInt() == OMPC_DEVICE_ancestor) {
       // Reverse offloading is not supported, so just execute on the host.
@@ -10392,6 +10391,7 @@ void CGOpenMPRuntime::emitTargetCall(
 
     // From this point on, we need to have an ID of the target region defined.
     assert(OutlinedFnID && "Invalid outlined function ID!");
+    (void)OutlinedFnID;
 
     // Emit device ID if any.
     llvm::Value *DeviceID;
@@ -10529,8 +10529,7 @@ void CGOpenMPRuntime::emitTargetCall(
   };
 
   // Notify that the host version must be executed.
-  auto &&ElseGen = [this, &D, OutlinedFn, &CS, &CapturedVars, RequiresOuterTask,
-                    FallbackGen](CodeGenFunction &CGF, PrePostActionTy &) {
+  auto &&ElseGen = [FallbackGen](CodeGenFunction &CGF, PrePostActionTy &) {
     FallbackGen(CGF);
   };
 


        


More information about the cfe-commits mailing list