Skip to content

Commit 2ce0493

Browse files
committed
Avoid crashing if a MacroExpansionExpr failed to produce an expression
1 parent 1b1f28d commit 2ce0493

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Sema/TypeCheckConcurrency.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -4113,7 +4113,8 @@ namespace {
41134113
}
41144114

41154115
if (auto *macro = dyn_cast<MacroExpansionExpr>(expr)) {
4116-
expr = macro->getRewritten();
4116+
if (auto rewritten = macro->getRewritten())
4117+
expr = rewritten;
41174118
}
41184119

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

0 commit comments

Comments
 (0)