[clang] 9698a44 - Fix warning by handling OMPC_fail in switch statement.

Adrian Kuegel via cfe-commits cfe-commits at lists.llvm.org
Wed May 25 00:35:22 PDT 2022


Author: Adrian Kuegel
Date: 2022-05-25T09:33:41+02:00
New Revision: 9698a445c664e6f0da5727364338ee99de537d6a

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

LOG: Fix warning by handling OMPC_fail in switch statement.

Added: 
    

Modified: 
    clang/lib/CodeGen/CGStmtOpenMP.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp
index 61e3661e59be0..ebe65e5f72b3e 100644
--- a/clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -6317,6 +6317,7 @@ static void emitOMPAtomicExpr(CodeGenFunction &CGF, OpenMPClauseKind Kind,
   case OMPC_bind:
   case OMPC_align:
   case OMPC_cancellation_construct_type:
+  case OMPC_fail:
     llvm_unreachable("Clause is not allowed in 'omp atomic'.");
   }
 }


        


More information about the cfe-commits mailing list