HomePhabricator

[Sema] Fix an assert when a block captures a constexpr local

Authored by erik.pilkington on Mar 26 2019, 4:21 PM.

Description

[Sema] Fix an assert when a block captures a constexpr local

MarkVarDeclODRUsed indirectly calls captureInBlock, which creates a copy
expression. The copy expression is insulated in it's own
ExpressionEvaluationContext, so it saves, mutates, and restores MaybeODRUseExprs
as CleanupVarDeclMarking is iterating through it, leading to a crash. Fix this
by iterating through a local copy of MaybeODRUseExprs.

rdar://47493525

https://reviews.llvm.org/D59670

llvm-svn: 357040

Details

Committed
erik.pilkingtonMar 26 2019, 4:21 PM
Parents
rGe6eef49f05da: [ConstantRange] Exclude full set from isSignWrappedSet()
Branches
Unknown
Tags
Unknown