Skip to content

Commit af37fc0

Browse files
committed
Make sure we parse a syntax tree when macros are enabled
1 parent 8461427 commit af37fc0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Parse/ParseDecl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ extern "C" void swift_ASTGen_buildTopLevelASTNodes(void *sourceFile,
199199
/// \endverbatim
200200
void Parser::parseTopLevel(SmallVectorImpl<Decl *> &decls) {
201201
#ifdef SWIFT_SWIFT_PARSER
202-
if ((Context.LangOpts.hasFeature(Feature::BuiltinMacros) ||
202+
if ((Context.LangOpts.hasFeature(Feature::Macros) ||
203+
Context.LangOpts.hasFeature(Feature::BuiltinMacros) ||
203204
Context.LangOpts.hasFeature(Feature::ParserASTGen)) &&
204205
!SourceMgr.hasCodeCompletionBuffer() &&
205206
SF.Kind != SourceFileKind::SIL) {

0 commit comments

Comments
 (0)