[flang-commits] [flang] 366534f - [flang] Fix a warning

Kazu Hirata via flang-commits flang-commits at lists.llvm.org
Sun Oct 30 12:33:46 PDT 2022


Author: Kazu Hirata
Date: 2022-10-30T12:33:39-07:00
New Revision: 366534f1756ba9bf711771ab845aa4b27dd785c8

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

LOG: [flang] Fix a warning

This patch fixes:

  flang/lib/Evaluate/fold-integer.cpp:613:25: error: lambda capture
  'name' is not used [-Werror,-Wunused-lambda-capture]

Added: 
    

Modified: 
    flang/lib/Evaluate/fold-integer.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Evaluate/fold-integer.cpp b/flang/lib/Evaluate/fold-integer.cpp
index 3ef3b957e850..1efb7415610e 100644
--- a/flang/lib/Evaluate/fold-integer.cpp
+++ b/flang/lib/Evaluate/fold-integer.cpp
@@ -610,8 +610,7 @@ Expr<Type<TypeCategory::Integer, KIND>> FoldIntrinsicFunction(
             name);
       } else {
         return common::visit(
-            [&funcRef, &name, &context, &FromInt64](
-                const auto &str) -> Expr<T> {
+            [&funcRef, &context, &FromInt64](const auto &str) -> Expr<T> {
               using Char = typename std::decay_t<decltype(str)>::Result;
               return FoldElementalIntrinsic<T, Char>(context,
                   std::move(funcRef),


        


More information about the flang-commits mailing list