@@ -60,20 +60,6 @@ class SCOPED_LOCKABLE ReleasableMutexLock {
6060 void Release () UNLOCK_FUNCTION();
6161};
6262
63- template <typename T>
64- struct lock_guard {
65- lock_guard<T>(T) {}
66- ~lock_guard<T>() {}
67- };
68- template <typename T>
69- struct unique_lock {
70- unique_lock<T>(T) {}
71- ~unique_lock<T>() {}
72- };
73-
74- template <class T , class ... Ts>
75- void LockMutexes (T &m, Ts &...ms) __attribute__((exclusive_lock_function(m, ms...)));
76-
7763
7864// The universal lock, written "*", allows checking to be selectively turned
7965// off for a particular piece of code.
@@ -330,23 +316,4 @@ void sls_fun_bad_12() {
330316 expected-warning{{releasing mutex 'sls_mu' that was not held}}
331317}
332318
333- Mutex m0, m1;
334- void non_local_mutex_held () {
335- LockMutexes (m0, m1); // expected-note {{mutex acquired here}} \
336- // expected-note {{mutex acquired here}}
337- } // expected-warning{{mutex 'm0' is still held at the end of function}} \
338- // expected-warning{{mutex 'm1' is still held at the end of function}}
339-
340- void no_local_mutex_held_warning () {
341- Mutex local_m0;
342- Mutex local_m1;
343- LockMutexes (local_m0, local_m1);
344- } // No warnings expected at end of function scope as the mutexes are function local.
345-
346- void no_local_unique_locks_held_warning () {
347- unique_lock<Mutex> ul0 (m0);
348- unique_lock<Mutex> ul1 (m1);
349- LockMutexes (ul0, ul1);
350- } // No warnings expected at end of function scope as the unique_locks held are function local.
351-
352319#endif
0 commit comments