Skip to content

Commit 103b4a8

Browse files
authored
[Parse] Restore a couple of StructureMarkerRAII (#62193)
These are accidentally removed in 530d937
1 parent 1ab3051 commit 103b4a8

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

lib/Parse/ParseIfConfig.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,9 @@ Result Parser::parseIfConfigRaw(
776776
llvm::function_ref<Result(SourceLoc endLoc, bool hadMissingEnd)> finish) {
777777
assert(Tok.is(tok::pound_if));
778778

779+
Parser::StructureMarkerRAII ParsingDecl(
780+
*this, Tok.getLoc(), Parser::StructureMarkerKind::IfConfig);
781+
779782
// Find the region containing code completion token.
780783
SourceLoc codeCompletionClauseLoc;
781784
if (SourceMgr.hasCodeCompletionBuffer() &&

lib/Parse/ParseStmt.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,10 @@ ParserResult<Stmt> Parser::parseStmt() {
511511
consumeToken(tok::colon);
512512
}
513513

514+
// Note that we're parsing a statement.
515+
StructureMarkerRAII ParsingStmt(*this, Tok.getLoc(),
516+
StructureMarkerKind::Statement);
517+
514518
SourceLoc tryLoc;
515519
(void)consumeIf(tok::kw_try, tryLoc);
516520

0 commit comments

Comments
 (0)