[Serialization] Drop overriding properties with missing bases.

Like the previous commit, but with added trickiness because we also
serialize the form of the PatternBindingDecl a property came from.
Make getPattern handle a failure in the simple case that overrides
use, and pass that up to the PatternBindingDecl initialization. (This
can result in zero-element PatternBindingDecls, but that's fine.)

'getPattern' is also a change from 'maybeGetPattern', but every caller
knows how many patterns it expects, so accomodating the "maybe" case
is no longer important.
This commit is contained in:
Jordan Rose
2017-04-11 10:37:21 -07:00
parent 970f95930c
commit d0a9ec509e
4 changed files with 86 additions and 35 deletions

View File

@@ -503,9 +503,7 @@ private:
bool readCommentBlock(llvm::BitstreamCursor &cursor);
/// Recursively reads a pattern from \c DeclTypeCursor.
///
/// If the record at the cursor is not a pattern, returns null.
Pattern *maybeReadPattern(DeclContext *owningDC);
llvm::Expected<Pattern *> readPattern(DeclContext *owningDC);
ParameterList *readParameterList();