Skip to content

Commit 7ea0723

Browse files
committed
NFC: Clarify comment in TypeCheckSwitchStmt.cpp.
Unavailable cases _can_ be written in switch statements. However, they should not be required to be written for exhaustive matching.
1 parent 2442737 commit 7ea0723

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sema/TypeCheckSwitchStmt.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,8 +828,8 @@ namespace {
828828
auto children = E->getAllElements();
829829
llvm::transform(
830830
children, std::back_inserter(arr), [&](EnumElementDecl *eed) {
831-
// Don't force people to match unavailable cases; they can't
832-
// even write them.
831+
// Don't force people to match unavailable cases since they
832+
// should not be instantiated at run time.
833833
if (AvailableAttr::isUnavailable(eed)) {
834834
return Space();
835835
}

0 commit comments

Comments
 (0)