File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
test/SourceKit/SyntaxTree
tools/SourceKit/lib/SwiftLang Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -emit-syntax %s > %t.emit
2
+ // RUN: %sourcekitd-test -req=syntax-tree %s > %t.sourcekit
3
+ // RUN: diff %t.emit %t.sourcekit
4
+
5
+ #if swift(<4)
6
+ print ( 1 )
7
+ #endif
Original file line number Diff line number Diff line change @@ -689,6 +689,9 @@ class SwiftDocumentSyntaxInfo {
689
689
690
690
Parser->getDiagnosticEngine ().addConsumer (DiagConsumer);
691
691
692
+ // Collecting syntactic information shouldn't evaluate # conditions.
693
+ Parser->getParser ().State ->PerformConditionEvaluation = false ;
694
+
692
695
// If there is a syntax parsing cache, incremental syntax parsing is
693
696
// performed and thus the generated AST may not be up-to-date.
694
697
HasUpToDateAST = CompInv.getMainFileSyntaxParsingCache () == nullptr ;
You can’t perform that action at this time.
0 commit comments