================
@@ -8370,4 +8370,32 @@ void testDependent(int n) {
callDependent<void (&)(int)>(callback, n); // expected-note {{in
instantiation of function template specialization
'FunctionPointers::callDependent<void (&)(int)>' requested here}}
}
+// lock_returned on a function pointer or reference.
+struct Guarded {
+ Mutex mu;
+ int data GUARDED_BY(mu);
+};
+Mutex &mu_ref_impl(Guarded &g) LOCK_RETURNED(g.mu);
+Mutex *(*mu_of)(Guarded *g) LOCK_RETURNED(&g->mu);
+Mutex &(&mu_ref_of)(Guarded &g) LOCK_RETURNED(g.mu) = mu_ref_impl;
----------------
aaronpuchert wrote:
This assignment is not checked at the moment, right? Maybe add a comment about
this gap.
https://github.com/llvm/llvm-project/pull/226561
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits