[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


================
@@ -1718,6 +1720,13 @@ struct TestScopedLockable {
     MutexLock{&mu1}, a = 5;
   }
 
+  void temporary2(int x) {
+    if (check(MutexLock{&mu1}) || x) {
+
+    }
+    check(MutexLock{&mu1});
----------------
aaronpuchert wrote:

The `check` here doesn't do anything, right?

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


More information about the cfe-commits mailing list