[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
================
@@ -1718,6 +1720,13 @@ struct TestScopedLockable {
MutexLock{&mu1}, a = 5;
}
+ void temporary2(int x) {
+ if (check(MutexLock{&mu1}) || x) {
+
+ }
----------------
aaronpuchert wrote:
The `if` is probably not needed here, right? We could just write
```suggestion
check(MutexLock{&mu1}) || x;
```
and should have the same CFG artifact.
https://github.com/llvm/llvm-project/pull/74020
More information about the cfe-commits
mailing list