Merge pull request #14945 from jrose-apple/frozen-enums

Implementation for /most/ of SE-0192 (frozen and non-frozen enums)
This commit is contained in:
Jordan Rose
2018-03-21 11:06:31 -07:00
committed by GitHub
78 changed files with 1967 additions and 327 deletions

View File

@@ -3224,6 +3224,13 @@ public:
bool isIndirect() const {
return getAttrs().hasAttribute<IndirectAttr>();
}
/// True if the enum can be exhaustively switched within \p useDC.
///
/// Note that this property is \e not necessarily true for all children of
/// \p useDC. In particular, an inlinable function does not get to switch
/// exhaustively over a non-exhaustive enum declared in the same module.
bool isExhaustive(const DeclContext *useDC) const;
};
/// StructDecl - This is the declaration of a struct, for example: