[clang] c5f480f - [OpenMP] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off build after D109635

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 16 10:19:40 PDT 2021


Author: Fangrui Song
Date: 2021-09-16T10:19:35-07:00
New Revision: c5f480fcbec04f46a9cfcad08914665ff83d8d8a

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

LOG: [OpenMP] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off build after D109635

Added: 
    

Modified: 
    clang/lib/Sema/SemaOpenMP.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 89a6654afdea..3fcc7abca5c5 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -739,6 +739,7 @@ class DSAStackTy {
       for (llvm::omp::TraitProperty Trait : llvm::reverse(Traits)) {
         llvm::omp::TraitProperty Top = ConstructTraits.pop_back_val();
         assert(Top == Trait && "Something left a trait on the stack!");
+        (void)Top;
       }
   }
 


        


More information about the cfe-commits mailing list