================
@@ -308,14 +308,14 @@ struct FPOps {
void test_fp_ops(struct FPOps *ops) {
ops->lock();
- ops->a = 42;
+ ops->a = 42; // expected-warning {{writing variable 'a' requires holding
mutex 'ops->mu' exclusively}} expected-note {{found near match 'mu'}}
----------------
Caryoake wrote:
Since I introduced CThisExpr, it looks like the TSA evaluates the base context
differently for C function pointers.
For field access, (ops->a), the SelfArg is set to ops and hence ops->mu.
But for function pointer call, (ops->lock()), TSA fails to extract the SelfArg.
This forced the generic mu and hence the mismatch and false positive.
Im immediately reverting the changes in warn-thread-safety-analysis.c and
fixing the Thread Safety Analyser
https://github.com/llvm/llvm-project/pull/199241
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits