[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:06 PST 2023


================
@@ -2392,6 +2397,8 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) {
   for (const auto &Lock : LocksReleased)
     ExpectedFunctionExitSet.removeLock(FactMan, Lock);
 
+  ConstructedObjectMapTy ConstructedObjects;
----------------
aaronpuchert wrote:

I wonder if we should put it into the `ThreadSafetyAnalyzer`, where we already have the similar `LocalVariableMap`. Then we don't need to pass it into `BuildLockset`, because that already has a pointer to the `ThreadSafetyAnalyzer`.

https://github.com/llvm/llvm-project/pull/74020


More information about the cfe-commits mailing list