[clang] 4ae33c5 - Fix MSVC "switch statement contains 'default' but no 'case' labels" warning. NFC.
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 9 02:00:12 PDT 2024
Author: Simon Pilgrim
Date: 2024-04-09T09:59:57+01:00
New Revision: 4ae33c52f794dbd64924dd006570cdc409c297bc
URL: https://github.com/llvm/llvm-project/commit/4ae33c52f794dbd64924dd006570cdc409c297bc
DIFF: https://github.com/llvm/llvm-project/commit/4ae33c52f794dbd64924dd006570cdc409c297bc.diff
LOG: Fix MSVC "switch statement contains 'default' but no 'case' labels" warning. NFC.
Added:
Modified:
clang/lib/Sema/SemaOpenACC.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaOpenACC.cpp b/clang/lib/Sema/SemaOpenACC.cpp
index f520b9bfe81193..2ba1e49b5739db 100644
--- a/clang/lib/Sema/SemaOpenACC.cpp
+++ b/clang/lib/Sema/SemaOpenACC.cpp
@@ -39,14 +39,11 @@ bool diagnoseConstructAppertainment(SemaOpenACC &S, OpenACCDirectiveKind K,
bool doesClauseApplyToDirective(OpenACCDirectiveKind DirectiveKind,
OpenACCClauseKind ClauseKind) {
- switch (ClauseKind) {
- // FIXME: For each clause as we implement them, we can add the
- // 'legalization' list here.
- default:
- // Do nothing so we can go to the 'unimplemented' diagnostic instead.
- return true;
- }
- llvm_unreachable("Invalid clause kind");
+ // FIXME: For each clause as we implement them, we can add the
+ // 'legalization' list here.
+
+ // Do nothing so we can go to the 'unimplemented' diagnostic instead.
+ return true;
}
} // namespace
More information about the cfe-commits
mailing list