================
@@ -7223,4 +7225,10 @@ class TestNegativeWithReentrantMutex {
}
};
+typedef int __attribute__((capability("role"), reentrant_capability))
ThreadRole;
+ThreadRole FlightControl1, FlightControl2;
+void dispatch_log(const char *msg)
__attribute__((requires_capability(!FlightControl1 && !FlightControl2))) {} // \
+ // expected-warning{{'ThreadRole' (aka 'int') is marked reentrant but used
as a negative capability; this may be contradictory}} \
----------------
AaronBallman wrote:
Oooh, the reason this test passes despite the `DefaultIgnore` is because the
diagnostic is enabled by `-Wthread-safety` which is the only way to enable any
thread safety diagnostics.
If we want the diagnostic to be ignored by default, we'd leave the group out of
`-Wthread-safety` but that could get awkward (what if you enable just the
pedantic warning and nothing else? ew.)
So I think we should drop the `DefaultIgnore` above to avoid confusion.
https://github.com/llvm/llvm-project/pull/141599
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits