Skip to content

Commit e6113b3

Browse files
[cherry-pick release/6.0.0][Sema] Don't clear ParsedUnrecognizedPlatformName when a recognized platform is parsed
The callers of parsePlatformVersionInList need to know if an unrecognized platform was parsed in the whole list. It can get cleared in the case of (unrecognized 1.0, *) but PlatformAndVersions will still be empty. rdar://134207783
1 parent e72af26 commit e6113b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Parse/ParseDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2226,7 +2226,7 @@ ParserStatus Parser::parsePlatformVersionInList(StringRef AttrName,
22262226
// Parse the platform name.
22272227
StringRef platformText = Tok.getText();
22282228
auto MaybePlatform = platformFromString(platformText);
2229-
ParsedUnrecognizedPlatformName = !MaybePlatform.has_value();
2229+
ParsedUnrecognizedPlatformName = ParsedUnrecognizedPlatformName || !MaybePlatform.has_value();
22302230
SourceLoc PlatformLoc = Tok.getLoc();
22312231
consumeToken();
22322232

0 commit comments

Comments
 (0)