Serialization: Handle enum cases in ExternallyAccessibleDeclVisitor.

This commit is contained in:
Allan Shortlidge
2023-09-14 10:02:51 -07:00
parent ee479fe21b
commit 4522963cf7
5 changed files with 56 additions and 3 deletions

View File

@@ -3416,9 +3416,20 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
UNREACHABLE(IfConfig);
UNREACHABLE(PrecedenceGroup);
UNREACHABLE(Operator);
UNREACHABLE(EnumCase);
#undef UNREACHABLE
// Uninteresting decls are always considered external. A kind of decl might
// always be external if it is declared at the top level and access control
// does not apply to it. Or, a kind of decl could be considered always
// external because it is only found nested within other declarations that
// have their own access level, in which case we assume that the declaration
// context has already been checked.
#define UNINTERESTING(KIND) \
bool visit##KIND##Decl(const KIND##Decl *D) { return true; }
UNINTERESTING(EnumCase);
#undef UNINTERESTING
};
public: