[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)
Aaron Puchert via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 3 15:37:05 PST 2023
================
@@ -1544,7 +1544,10 @@ class BuildLockset : public ConstStmtVisitor<BuildLockset> {
// The fact set for the function on exit.
const FactSet &FunctionExitFSet;
/// Maps constructed objects to `this` placeholder prior to initialization.
- llvm::SmallDenseMap<const Expr *, til::LiteralPtr *> ConstructedObjects;
+ /// The map lives longer than this builder so this is a reference to an
+ /// existing one. The map lives so long as the CFG while this builder is for
+ /// one CFG block.
----------------
aaronpuchert wrote:
It's probably sufficient to explain this in the commit message.
https://github.com/llvm/llvm-project/pull/74020
More information about the cfe-commits
mailing list