Skip to content

Commit a84db8f

Browse files
authored
Merge pull request #80198 from DougGregor/current-context-isolation-crash
Avoid crashing if a MacroExpansionExpr failed to produce an expression
2 parents 06f6358 + 2ce0493 commit a84db8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: lib/Sema/TypeCheckConcurrency.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -4105,7 +4105,8 @@ namespace {
41054105
}
41064106

41074107
if (auto *macro = dyn_cast<MacroExpansionExpr>(expr)) {
4108-
expr = macro->getRewritten();
4108+
if (auto rewritten = macro->getRewritten())
4109+
expr = rewritten;
41094110
}
41104111

41114112
if (auto *isolation = dyn_cast<CurrentContextIsolationExpr>(expr)) {

0 commit comments

Comments
 (0)