Skip to content

Commit 2a597a7

Browse files
[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.
1 parent db0b5db commit 2a597a7

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
@@ -2227,7 +2227,7 @@ ParserStatus Parser::parsePlatformVersionInList(StringRef AttrName,
22272227
// Parse the platform name.
22282228
StringRef platformText = Tok.getText();
22292229
auto MaybePlatform = platformFromString(platformText);
2230-
ParsedUnrecognizedPlatformName = !MaybePlatform.has_value();
2230+
ParsedUnrecognizedPlatformName = ParsedUnrecognizedPlatformName || !MaybePlatform.has_value();
22312231
SourceLoc PlatformLoc = Tok.getLoc();
22322232
consumeToken();
22332233

0 commit comments

Comments
 (0)