[clang] 4d34c4e - [OpenMP] Fix -Wswitch (due to new OMPC_cancellation_construct_type) after D123828
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Mon May 2 12:10:16 PDT 2022
Author: Fangrui Song
Date: 2022-05-02T12:10:09-07:00
New Revision: 4d34c4e0e67d321ac6b52f787648a68ea6d267c0
URL: https://github.com/llvm/llvm-project/commit/4d34c4e0e67d321ac6b52f787648a68ea6d267c0
DIFF: https://github.com/llvm/llvm-project/commit/4d34c4e0e67d321ac6b52f787648a68ea6d267c0.diff
LOG: [OpenMP] Fix -Wswitch (due to new OMPC_cancellation_construct_type) after D123828
Added:
Modified:
clang/lib/CodeGen/CGStmtOpenMP.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp
index d6f81b33263f8..fc8156a78d6a7 100644
--- a/clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -6278,6 +6278,7 @@ static void emitOMPAtomicExpr(CodeGenFunction &CGF, OpenMPClauseKind Kind,
case OMPC_memory_order:
case OMPC_bind:
case OMPC_align:
+ case OMPC_cancellation_construct_type:
llvm_unreachable("Clause is not allowed in 'omp atomic'.");
}
}
More information about the cfe-commits
mailing list