[PATCH] D124128: Thread safety analysis: Store CapabilityExprs in ScopedLockableFactEntry (NFC)
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 26 07:40:28 PDT 2022
aaron.ballman added a comment.
Continues to LGTM
================
Comment at: clang/lib/Analysis/ThreadSafety.cpp:911-919
+ UnderlyingMutexes.push_back(UnderlyingCapability{M, UCK_Acquired});
}
void addExclusiveUnlock(const CapabilityExpr &M) {
- UnderlyingMutexes.emplace_back(M.sexpr(), UCK_ReleasedExclusive);
+ UnderlyingMutexes.push_back(UnderlyingCapability{M, UCK_ReleasedExclusive});
}
----------------
aaronpuchert wrote:
> aaron.ballman wrote:
> > I think we can continue to use `emplace_back()` here, can't we?
> For `emplace_back` we need a constructor and can't just do aggregate initialization. But I could omit the explicit type, like `UnderlyingMutexes.push_back({M, UCK_*})`.
Ah good point. No need to change anything, I was just hoping to be able to construct in place.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124128/new/
https://reviews.llvm.org/D124128
More information about the cfe-commits
mailing list