mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[AST] In IfConfigDecl/IfConfigStmt keep track of whether the IfBlock is active or not.
Swift SVN r15444
This commit is contained in:
@@ -812,15 +812,13 @@ ParserResult<Stmt> Parser::parseStmtIfConfig(BraceItemListKind Kind) {
|
||||
skipUntilConfigBlockClose();
|
||||
}
|
||||
|
||||
auto ifConfigStmt = new (Context) IfConfigStmt(IfLoc,
|
||||
auto ifConfigStmt = new (Context) IfConfigStmt(ifBlockIsActive,
|
||||
IfLoc,
|
||||
Configuration.getPtrOrNull(),
|
||||
NormalBody.get(),
|
||||
ElseLoc,
|
||||
ElseBody.getPtrOrNull(),
|
||||
EndLoc);
|
||||
ifConfigStmt->setActiveStmt(ifBlockIsActive ?
|
||||
NormalBody.get() :
|
||||
ElseBody.getPtrOrNull());
|
||||
|
||||
return makeParserResult(ifConfigStmt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user