File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2283,14 +2283,16 @@ Expr *Parser::parseExprIdentifier() {
2283
2283
if (D) {
2284
2284
for (auto activeVar : DisabledVars) {
2285
2285
if (activeVar == D) {
2286
- diagnose (loc.getBaseNameLoc (), DisabledVarReason);
2286
+ if (!Context.LangOpts .BuildSyntaxTree )
2287
+ diagnose (loc.getBaseNameLoc (), DisabledVarReason);
2287
2288
return new (Context) ErrorExpr (loc.getSourceRange ());
2288
2289
}
2289
2290
}
2290
2291
} else {
2291
2292
for (auto activeVar : DisabledVars) {
2292
2293
if (activeVar->getFullName () == name) {
2293
- diagnose (loc.getBaseNameLoc (), DisabledVarReason);
2294
+ if (!Context.LangOpts .BuildSyntaxTree )
2295
+ diagnose (loc.getBaseNameLoc (), DisabledVarReason);
2294
2296
return new (Context) ErrorExpr (loc.getSourceRange ());
2295
2297
}
2296
2298
}
You can’t perform that action at this time.
0 commit comments