Skip to content

Commit

Permalink
[Serialization] Make sure we handle all decl kinds
Browse files Browse the repository at this point in the history
...well, at least a little more than before. This /still/ isn't as
strong as the switch that used to be here because a subtype of an
existing Decl or Type won't show up, but that's probably still worth
the maintainability (and backtrace) tradeoff.
  • Loading branch information
jrose-apple committed May 24, 2019
1 parent dc1653f commit 6296a0e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/Serialization/Serialization.cpp
Expand Up @@ -2848,9 +2848,8 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
DeclVisitor<DeclSerializer>::visit(const_cast<Decl *>(D));
}

void visitDecl(const Decl *) {
llvm_unreachable("I guess we forgot a Decl kind?");
}
/// If this gets referenced, we forgot to handle a decl.
void visitDecl(const Decl *) = delete;

void visitExtensionDecl(const ExtensionDecl *extension) {
using namespace decls_block;
Expand Down

0 comments on commit 6296a0e

Please sign in to comment.