aaronpuchert added inline comments.

================
Comment at: clang/test/SemaCXX/warn-thread-safety-analysis.cpp:341
+  sls_mu.Unlock(); // \
+    // expected-warning{{releasing mutex 'sls_mu' that was not held}}
 }
----------------
This is just a side effect, not the reason I did the change.

It's consistent though with our usual behavior on joining forward edges, see 
e.g. `sls_fun_bad_11`.


================
Comment at: clang/test/SemaCXX/warn-thread-safety-analysis.cpp:2634
+  // No warning on join point because the lock will be released by the scope 
object anyway
+  a = 1; // expected-warning {{writing variable 'a' requires holding mutex 
'mu_' exclusively}}
+}
----------------
This warning was missing, and is the reason for this change.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101202/new/

https://reviews.llvm.org/D101202

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to