Skip to content

Commit 8ea88b7

Browse files
committed
[Parse] Register a syntax context while parsing availability macros
1 parent 1dbcf23 commit 8ea88b7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Parse/ParseDecl.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,6 +1632,9 @@ Parser::parseAvailabilityMacro(SmallVectorImpl<AvailabilitySpec *> &Specs) {
16321632
if (NameMatch == Map.end())
16331633
return makeParserSuccess(); // No match, it could be a standard platform.
16341634

1635+
SyntaxParsingContext VersionRestrictionContext(
1636+
SyntaxContext, SyntaxKind::AvailabilityVersionRestriction);
1637+
16351638
consumeToken();
16361639

16371640
llvm::VersionTuple Version;

0 commit comments

Comments
 (0)