[flang-commits] [flang] 38c502b - [flang] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off build

via flang-commits flang-commits at lists.llvm.org
Sat Apr 9 09:00:51 PDT 2022


Author: PeixinQiao
Date: 2022-04-09T23:57:50+08:00
New Revision: 38c502b6c7e35429ff58ccea869ff2d7793bb0e1

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

LOG: [flang] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off build

Fix the warning from D122483.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D123455

Added: 
    

Modified: 
    flang/lib/Lower/OpenMP.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Lower/OpenMP.cpp b/flang/lib/Lower/OpenMP.cpp
index 235159d8fdd7b..ac868755a0d56 100644
--- a/flang/lib/Lower/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP.cpp
@@ -222,9 +222,7 @@ genOMP(Fortran::lower::AbstractConverter &converter,
                        &clause.u)) {
       genAllocateClause(converter, allocateClause->v, allocatorOperands,
                         allocateOperands);
-    } else if (const auto &privateClause =
-                   std::get_if<Fortran::parser::OmpClause::Private>(
-                       &clause.u)) {
+    } else if (std::get_if<Fortran::parser::OmpClause::Private>(&clause.u)) {
       // TODO: Handle private. This cannot be a hard TODO because testing for
       // allocate clause requires private variables.
     } else {


        


More information about the flang-commits mailing list