We risk iterator invalidation issues if we use DenseMap structures for
MaterializedTemporaryExprs. Use a std::map to ensure that they don't
move around in memory.
This fixes PR24289.
Paths
| Differential D11629
APValues and Constants and MaterializedTemporaryExpr need to have stable maps ClosedPublic Authored by majnemer on Jul 30 2015, 12:10 AM.
Details Summary We risk iterator invalidation issues if we use DenseMap structures for This fixes PR24289.
Diff Detail Event Timeline
This revision is now accepted and ready to land.Aug 13 2015, 4:22 PM Closed by commit rL244989: Avoid iteration invalidation issues around MaterializedTemporaryExpr (authored by majnemer). · Explain WhyAug 13 2015, 4:51 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 30999 include/clang/AST/ASTContext.h
lib/AST/ASTContext.cpp
lib/CodeGen/CodeGenModule.h
test/CodeGenCXX/PR24289.cpp
|
I would prefer a DenseMap<const MaterializedTemporaryExpr*, APValue*>, with APValues allocated by the ASTContext's BumpPtrAllocator.