Skip to content

Commit 930ded7

Browse files
committed
Ignore SIL Files in Swift Syntax Parser Validation
Validating these files creates a load of false positive error cases since the new Swift parser doesn't handle SIL. Disable validating these files.
1 parent 435af14 commit 930ded7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Parse/ParseRequests.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ SourceFileParsingResult ParseSourceFileRequest::evaluate(Evaluator &evaluator,
196196
#ifdef SWIFT_SWIFT_PARSER
197197
if ((ctx.LangOpts.hasFeature(Feature::ParserRoundTrip) ||
198198
ctx.LangOpts.hasFeature(Feature::ParserValidation)) &&
199-
ctx.SourceMgr.getCodeCompletionBufferID() != bufferID) {
199+
ctx.SourceMgr.getCodeCompletionBufferID() != bufferID &&
200+
SF->Kind != SourceFileKind::SIL) {
200201
auto bufferRange = ctx.SourceMgr.getRangeForBuffer(*bufferID);
201202
unsigned int flags = 0;
202203

0 commit comments

Comments
 (0)