Merge pull request #36313 from ahoppen/pr/custom-opt-storage

[libSyntax] Hide null AbsoluteRawSyntax behind a custom OptionalStorage implementation
This commit is contained in:
Alex Hoppen
2021-03-09 09:44:20 +01:00
committed by GitHub
4 changed files with 557 additions and 192 deletions

View File

@@ -526,6 +526,7 @@ public:
/// Get a child based on a particular node's "Cursor", indicating
/// the position of the terms in the production of the Swift grammar.
const RawSyntax *getChild(CursorIndex Index) const {
assert(Index < getNumChildren() && "Index out of bounds");
return getLayout()[Index];
}