File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff 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 () &&
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments