[clang] 2414e5c - [Serialization] Fix warnings
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 4 12:24:12 PDT 2023
Author: Kazu Hirata
Date: 2023-11-04T12:24:06-07:00
New Revision: 2414e5cb9efa289b841bb814d20c7eb6f355fa4d
URL: https://github.com/llvm/llvm-project/commit/2414e5cb9efa289b841bb814d20c7eb6f355fa4d
DIFF: https://github.com/llvm/llvm-project/commit/2414e5cb9efa289b841bb814d20c7eb6f355fa4d.diff
LOG: [Serialization] Fix warnings
This patch fixes:
clang/lib/Serialization/ASTWriterStmt.cpp:576:3: error: default
label in switch which covers all enumeration values
[-Werror,-Wcovered-switch-default]
clang/lib/Serialization/ASTReaderStmt.cpp:561:3: error: default
label in switch which covers all enumeration values
[-Werror,-Wcovered-switch-default]
Added:
Modified:
clang/lib/Serialization/ASTReaderStmt.cpp
clang/lib/Serialization/ASTWriterStmt.cpp
Removed:
################################################################################
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp
index ab62f8f17851517..21d33e1c57cc988 100644
--- a/clang/lib/Serialization/ASTReaderStmt.cpp
+++ b/clang/lib/Serialization/ASTReaderStmt.cpp
@@ -558,8 +558,6 @@ void ASTStmtReader::VisitConstantExpr(ConstantExpr *E) {
Record.getContext().addDestruction(&E->APValueResult());
}
break;
- default:
- llvm_unreachable("unexpected ResultKind!");
}
E->setSubExpr(Record.readSubExpr());
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp
index 00b1e4261735990..edfa3fab6cd4576 100644
--- a/clang/lib/Serialization/ASTWriterStmt.cpp
+++ b/clang/lib/Serialization/ASTWriterStmt.cpp
@@ -573,8 +573,6 @@ void ASTStmtWriter::VisitConstantExpr(ConstantExpr *E) {
case ConstantResultStorageKind::APValue:
Record.AddAPValue(E->APValueResult());
break;
- default:
- llvm_unreachable("unexpected ResultKind!");
}
Record.AddStmt(E->getSubExpr());
More information about the cfe-commits
mailing list