File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-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
}
Original file line number Diff line number Diff line change @@ -25,4 +25,10 @@ if (5 ‒ 5) == 0 {}
25
25
// CHECK-NEXT: ([[@LINE-4]]:7,[[@LINE-4]]:10) Fixit: "-"
26
26
// CHECK-NEXT: [[@LINE-5]]:11 Error: expected ',' separator
27
27
// CHECK-NEXT: ([[@LINE-6]]:6,[[@LINE-6]]:6) Fixit: ","
28
+
29
+ let dateFormatter : DateFormatter = {
30
+ let dateFormatter = DateFormatter ( )
31
+ return dateFormatter
32
+ } ( )
33
+
28
34
// CHECK-NEXT: 7 error(s) 0 warnings(s) 2 note(s)
You can’t perform that action at this time.
0 commit comments