Lines Matching full:mutex
30 class LOCKABLE Mutex {
40 const Mutex& operator!() const { return *this; }
48 MutexLock(Mutex *mu) EXCLUSIVE_LOCK_FUNCTION(mu);
49 MutexLock(Mutex *mu, bool adopt) EXCLUSIVE_LOCKS_REQUIRED(mu);
55 ReaderMutexLock(Mutex *mu) SHARED_LOCK_FUNCTION(mu);
56 ReaderMutexLock(Mutex *mu, bool adopt) SHARED_LOCKS_REQUIRED(mu);
62 ReleasableMutexLock(Mutex *mu) EXCLUSIVE_LOCK_FUNCTION(mu);
70 DoubleMutexLock(Mutex *mu1, Mutex *mu2)
141 Mutex sls_mu;
143 Mutex sls_mu2 __attribute__((acquired_after(sls_mu)));
151 Mutex mu;
253 // expected-warning{{releasing mutex 'sls_mu' that was not held}}
259 // expected-warning{{acquiring mutex 'sls_mu' that is already held}}
264 sls_mu.Lock(); // expected-note {{mutex acquired here}}
265 } // expected-warning{{mutex 'sls_mu' is still held at the end of function}}
269 sls_mu.Lock(); // expected-note{{mutex acquired here}}
271 sls_mu2.Lock(); // expected-note{{mutex acquired here}}
272 } // expected-warning{{mutex 'sls_mu' is not held on every path through here}} \
273 // expected-warning{{mutex 'sls_mu2' is not held on every path through here}}
276 sls_mu.Lock(); // expected-note {{mutex acquired here}}
279 } // expected-warning{{mutex 'sls_mu' is not held on every path through here}}
283 sls_mu.Lock(); // expected-note {{mutex acquired here}}
292 expected-warning{{mutex 'sls_mu' is not held on every path through here}}\
293 expected-warning{{releasing mutex 'sls_mu' that was not held}}
303 expected-warning{{expecting mutex 'sls_mu' to be held at start of each loop}}
306 sls_mu.Lock(); // expected-note {{mutex acquired here}}
312 sls_mu.Lock(); // expected-note{{mutex acquired here}}
315 sls_mu.Unlock(); // expected-warning{{expecting mutex 'sls_mu' to be held at start of each loop}}
322 // expected-warning{{expecting mutex 'sls_mu' to be held at start of each loop}} \
323 // expected-note{{mutex acquired here}}
329 sls_mu.Lock(); // expected-note 2{{mutex acquired here}}
330 while(getBool()) { // expected-warning{{expecting mutex 'sls_mu' to be held at start of each loop}}
333 } // expected-warning{{mutex 'sls_mu' is still held at the end of function}}
337 expected-warning{{expecting mutex 'sls_mu' to be held at start of each loop}}
338 sls_mu.Lock(); // expected-note {{mutex acquired here}}
341 // expected-warning{{releasing mutex 'sls_mu' that was not held}}
345 sls_mu.Lock(); // expected-note {{mutex acquired here}}
350 break; // expected-warning{{mutex 'sls_mu' is not held on every path through here}}
362 Mutex aa_mu;
379 // expected-warning{{releasing mutex 'aa_mu' that was not held}}
385 // expected-warning{{acquiring mutex 'aa_mu' that is already held}}
390 glock.globalLock(); // expected-note{{mutex acquired here}}
391 } // expected-warning{{mutex 'aa_mu' is still held at the end of function}}
397 Mutex wmu;
403 wmu.Lock(); // EXPECTED-NOTE {{mutex acquired here}}
404 } // EXPECTED-WARNING {{mutex 'wmu' is still held at the end of function}}
406 wmu.Lock(); // EXPECTED-NOTE {{mutex acquired here}}
407 } // EXPECTED-WARNING {{mutex 'wmu' is still held at the end of function}}
409 wmu.Lock(); // expected-note {{mutex acquired here}}
410 } // expected-warning {{mutex 'wmu' is still held at the end of function}}
412 wmu.Lock(); // expected-note {{mutex acquired here}}
414 } // expected-warning {{mutex 'wmu' is still held at the end of function}}
431 // expected-warning {{writing variable 'pgb_field' requires holding mutex 'sls_mu2' exclusively}}
432 *pgb_field = x; // expected-warning {{reading variable 'pgb_field' requires holding mutex 'sls_mu2'}} \
433 // expected-warning {{writing the value pointed to by 'pgb_field' requires holding mutex 'sls_mu' exclusively}}
434 x = *pgb_field; // expected-warning {{reading variable 'pgb_field' requires holding mutex 'sls_mu2'}} \
435 // expected-warning {{reading the value pointed to by 'pgb_field' requires holding mutex 'sls_mu'}}
436 (*pgb_field)++; // expected-warning {{reading variable 'pgb_field' requires holding mutex 'sls_mu2'}} \
437 // expected-warning {{writing the value pointed to by 'pgb_field' requires holding mutex 'sls_mu' exclusively}}
447 // expected-warning {{writing variable 'gb_field' requires holding mutex 'sls_mu' exclusively}}
480 // expected-warning{{writing variable 'sls_guard_var' requires holding any mutex exclusively}}
485 // expected-warning{{reading variable 'sls_guard_var' requires holding any mutex}}
490 // expected-warning {{writing variable 'sls_guardby_var' requires holding mutex 'sls_mu' exclusively}}
495 // expected-warning {{reading variable 'sls_guardby_var' requires holding mutex 'sls_mu'}}
500 // expected-warning {{writing the value pointed to by 'pgb_gvar' requires holding any mutex exclusively}}
505 // expected-warning {{reading the value pointed to by 'pgb_gvar' requires holding any mutex}}
510 // expected-warning {{writing the value pointed to by 'pgb_var' requires holding mutex 'sls_mu' exclusively}}
515 // expected-warning {{reading the value pointed to by 'pgb_var' requires holding mutex 'sls_mu'}}
521 // expected-warning {{writing variable 'gb_field' requires holding mutex 'sls_mu'}}
526 // expected-warning{{writing variable 'sls_guard_var' requires holding any mutex exclusively}}
528 // expected-warning{{writing variable 'sls_guard_var' requires holding any mutex exclusively}}
530 // expected-warning{{writing variable 'sls_guard_var' requires holding any mutex exclusively}}
532 // expected-warning{{writing variable 'sls_guard_var' requires holding any mutex exclusively}}
548 // expected-warning{{writing variable 'a' requires holding mutex 'mu' exclusively}}
550 // expected-warning {{reading variable 'a' requires holding mutex 'mu'}}
552 // expected-warning {{writing variable 'c' requires holding mutex 'mu' exclusively}}
557 Mutex mu;
565 Mutex mu1_;
566 Mutex mu;
594 // expected-warning{{writing variable 'a' requires holding mutex 'fooB.mu' exclusively}} \
600 Mutex mu;
605 // expected-warning{{reading the value pointed to by 'q' requires holding mutex 'b1.mu'}}
615 // expected-warning{{writing variable 'a' requires holding mutex 'BarA.Foo.mu' exclusively}} \
624 // expected-warning{{writing variable 'a' requires holding mutex 'BarA.FooPointer->mu' exclusively}} \
633 // expected-warning{{writing variable 'a' requires holding mutex 'BarA.Foo2.mu' exclusively}} \
653 // expected-warning {{mutex 'sls_mu' is acquired exclusively and shared in the same scope}}
657 // expected-note {{the other acquisition of mutex 'sls_mu' is here}}
683 // expected-warning {{mutex 'sls_mu' is acquired exclusively and shared in the same scope}}
686 // expected-note {{the other acquisition of mutex 'sls_mu' is here}}
692 // expected-warning {{mutex 'sls_mu' is acquired exclusively and shared in the same scope}}
696 // expected-note {{the other acquisition of mutex 'sls_mu' is here}}
704 // expected-warning {{mutex 'sls_mu' is acquired exclusively and shared in the same scope}}
707 // expected-note {{the other acquisition of mutex 'sls_mu' is here}}
715 // expected-warning {{mutex 'sls_mu' is acquired exclusively and shared in the same scope}}
718 // expected-note {{the other acquisition of mutex 'sls_mu' is here}}
807 // expected-warning {{calling function 'aa_elr_fun' requires holding mutex 'aa_mu' exclusively}}
813 // expected-warning {{calling function 'aa_elr_fun' requires holding mutex 'aa_mu' exclusively}}
819 // expected-warning {{calling function 'aa_elr_fun_s' requires holding mutex 'aa_mu'}}
824 // expected-warning {{calling function 'test' requires holding mutex 'sls_mu' exclusively}}
829 // expected-warning {{calling function 'testShared' requires holding mutex 'sls_mu2'}}
835 // expected-warning {{calling function 'test' requires holding mutex 'sls_mu' exclusively}}
842 // expected-warning {{cannot call function 'le_fun' while mutex 'sls_mu' is held}}
849 // expected-warning {{cannot call function 'le_fun' while mutex 'sls_mu' is held}}
877 static Mutex mu1_;
896 Mutex mu;
903 Mutex mu1_ ACQUIRED_AFTER(mu);
930 Mutex mu1;
931 Mutex mu2 ACQUIRED_AFTER(mu1);
975 Mutex mu_;
991 Mutex *mu_;
1016 Mutex foo_mu_;
1022 Mutex bar_mu_ ACQUIRED_AFTER(foo->foo_mu_);
1089 Mutex mu;
1095 Mutex *mu1;
1096 Mutex *mu2;
1124 Mutex mu_;
1139 Mutex mu_;
1176 Mutex mu;
1195 Mutex mu_;
1225 Mutex mu1;
1226 Mutex mu2;
1239 Mutex mu_ ACQUIRED_AFTER(mu1);
1254 x = foo(); // expected-warning {{calling function 'foo' requires holding mutex 'mu2' exclusively}}
1268 f1.bar(); // expected-warning {{cannot call function 'bar' while mutex 'f1.mu_' is held}}
1274 f2->bar(); // expected-warning {{cannot call function 'bar' while mutex 'f2->mu_' is held}}
1293 Mutex mu1_;
1303 // expected-warning {{writing variable 'a_' requires holding mutex 'b2->mu1_' exclusively}} \
1314 Mutex mu;
1321 Mutex mu1_ ACQUIRED_AFTER(mu);
1333 res = b1.a_ + b3->b_; // expected-warning {{reading variable 'a_' requires holding mutex 'b1.mu1_'}} \
1334 // expected-warning {{writing variable 'res' requires holding mutex 'mu' exclusively}} \
1336 *p = i; // expected-warning {{reading variable 'p' requires holding mutex 'mu'}} \
1337 // expected-warning {{writing the value pointed to by 'p' requires holding mutex 'mu' exclusively}}
1338 b1.a_ = res + b3->b_; // expected-warning {{reading variable 'res' requires holding mutex 'mu'}} \
1339 // expected-warning {{writing variable 'a_' requires holding mutex 'b1.mu1_' exclusively}} \
1341 b3->b_ = *b1.q; // expected-warning {{reading the value pointed to by 'q' requires holding mutex 'mu'}}
1343 b1.b_ = res; // expected-warning {{reading variable 'res' requires holding mutex 'mu'}}
1344 x = res; // expected-warning {{reading variable 'res' requires holding mutex 'mu'}}
1354 Mutex lock_;
1366 // expected-warning {{calling function 'bar' requires holding mutex 'child->lock_' exclusively}} \
1369 // expected-warning {{writing variable 'a_' requires holding mutex 'child->lock_' exclusively}} \
1393 Mutex lock_;
1407 child->Func(new_foo); // expected-warning {{cannot call function 'Func' while mutex 'child->lock_' is held}}
1433 Mutex mu1, mu2, mu3;
1446 f2(); // expected-warning {{cannot call function 'f2' while mutex 'mu1' is held}} \
1447 // expected-warning {{cannot call function 'f2' while mutex 'mu2' is held}}
1455 foo->f1(); // expected-warning {{calling function 'f1' requires holding mutex 'foo->mu2' exclusively}} \
1456 // expected-warning {{calling function 'f1' requires holding mutex 'foo->mu1' exclusively}}
1466 Mutex mu_;
1479 b->func1(); // expected-warning {{calling function 'func1' requires holding mutex 'b->mu_' exclusively}}
1481 b->func2(); // expected-warning {{cannot call function 'func2' while mutex 'b->mu_' is held}}
1484 c->func1(); // expected-warning {{calling function 'func1' requires holding mutex 'c->mu_' exclusively}}
1486 c->func2(); // expected-warning {{cannot call function 'func2' while mutex 'c->mu_' is held}}
1495 Mutex mu;
1496 Mutex mu3;
1502 Mutex *mu1;
1503 Mutex *mu2;
1513 a.method1(1); // expected-warning {{calling function 'method1' requires holding mutex 'a.mu1'}} \
1514 // expected-warning {{calling function 'method1' requires holding mutex 'mu'}} \
1515 // expected-warning {{calling function 'method1' requires holding mutex 'a.mu2'}} \
1516 // expected-warning {{calling function 'method1' requires holding mutex 'mu3'}}
1524 Mutex mu;
1559 dlr.lockData(d1); // expected-note {{mutex acquired here}}
1561 // expected-warning {{releasing mutex 'd2->mu' that was not held}}
1562 } // expected-warning {{mutex 'd1->mu' is still held at the end of function}}
1568 // expected-warning {{calling function 'foo' requires holding mutex 'd2->mu' exclusively}} \
1578 Mutex fooMu;
1598 Mutex m;
1601 Mutex m;
1611 u->n = 0; // expected-warning {{reading variable 'u' requires holding mutex 'm'}}
1612 return t->s->n; // expected-warning {{reading variable 's' requires holding mutex 't->m'}}
1622 Mutex m;
1628 v.p->f(u); // expected-warning {{reading variable 'p' requires holding mutex 'v.m'}}
1638 Mutex mu1;
1639 Mutex mu2;
1665 // expected-warning {{acquiring mutex 'mu1' that is already held}}
1688 Mutex mu_;
1697 foo(); // expected-warning {{calling function 'foo' requires holding mutex 'fooObj.mu_' exclusively}}
1709 Mutex mu;
1773 a = 8; // expected-warning {{writing variable 'a' requires holding mutex 'mu' exclusively}}
1799 a = 10; // expected-warning {{writing variable 'a' requires holding mutex 'mu' exclusively}}
1839 Mutex mu_;
1846 Mutex mu_;
1893 Mutex mu_;
1927 // expected-warning {{calling function 'barTD' requires holding mutex 'f1.mu_' exclusively}} \
1936 // expected-warning {{writing variable 'data' requires holding mutex 'cell.mu_' exclusively}}
1966 Mutex mu_;
1967 static Mutex static_mu_;
1991 Mutex mu_;
2005 // expected-warning {{calling function 'foo1' requires holding mutex 'myfoo.mu_' exclusively}}
2015 struct __attribute__((lockable)) mutex {
2022 mutex m;
2031 continue; // expected-warning {{expecting mutex 'm' to be held at start of each loop}}
2035 m.lock(); // expected-note {{mutex acquired here}}
2058 Mutex mu_;
2067 Mutex mu_;
2120 // expected-warning {{calling function 'foo2' requires holding mutex 'myFoo.mu_' exclusively}}
2122 // expected-warning {{calling function 'foo3' requires holding mutex 'myFoo.mu_' exclusively}}
2124 // expected-warning {{calling function 'fooT1' requires holding mutex 'myFoo.mu_' exclusively}}
2127 // expected-warning {{calling function 'fooT2' requires holding mutex 'myFoo.mu_' exclusively}}
2130 // expected-warning {{calling function 'fooF1' requires holding mutex 'myFoo.mu_' exclusively}}
2132 // expected-warning {{calling function 'fooF2' requires holding mutex 'myFoo.mu_' exclusively}}
2134 mutex 'myFoo.mu_' exclusively}}
2150 // expected-warning {{calling function 'foo' requires holding mutex 'myFooT.mu_' exclusively}}
2178 // expected-warning {{writing variable 'foo' requires holding mutex 'this' exclusively}}
2185 Mutex mu_;
2208 Mutex* mutex_;
2221 Mutex mu_;
2243 // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
2245 // expected-warning {{writing variable 'b' requires holding mutex 'mu_' exclusively}}
2247 // expected-warning {{writing variable 'c' requires holding mutex 'mu_' exclusively}}
2251 Mutex mu_;
2274 Mutex mu_;
2343 // expected-warning {{writing variable 'a' requires holding mutex 'bar.getFooey().mu_' exclusively}} \
2349 // expected-warning {{writing variable 'a' requires holding mutex 'bar.getFoo2(b).mu_' exclusively}} \
2355 // expected-warning {{writing variable 'a' requires holding mutex 'bar.getFoo3(a, c).mu_' exclusively}} \
2361 // expected-warning {{writing variable 'a' requires holding mutex 'getBarFoo(bar, b).mu_' exclusively}} \
2367 // expected-warning {{writing variable 'a' requires holding mutex '((0 < a) ? fooArray[b] : fooArray[c]).mu_' exclusively}} \
2379 Mutex mu;
2406 Mutex* getMu() LOCK_RETURNED(mu_);
2408 Mutex mu_;
2410 static Mutex* getMu(Foo* f) LOCK_RETURNED(f->mu_);
2416 f1->a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'f1->mu_' exclusively}}
2417 f1->foo(); // expected-warning {{calling function 'foo' requires holding mutex 'f1->mu_' exclusively}}
2419 f1->foo2(f2); // expected-warning {{calling function 'foo2' requires holding mutex 'f1->mu_' exclusively}} \
2420 // expected-warning {{calling function 'foo2' requires holding mutex 'f2->mu_' exclusively}}
2421 Foo::sfoo(f1); // expected-warning {{calling function 'sfoo' requires holding mutex 'f1->mu_' exclusively}}
2428 // expected-warning {{calling function 'foo2' requires holding mutex 'f2->mu_' exclusively}} \
2441 Mutex* getFooMu(Foo* f) LOCK_RETURNED(Foo::getMu(f));
2458 b1->b = 0; // expected-warning {{writing variable 'b' requires holding mutex 'b1->mu_' exclusively}}
2459 b1->bar(); // expected-warning {{calling function 'bar' requires holding mutex 'b1->mu_' exclusively}}
2460 b1->bar2(b2); // expected-warning {{calling function 'bar2' requires holding mutex 'b1->mu_' exclusively}} \
2461 // expected-warning {{calling function 'bar2' requires holding mutex 'b2->mu_' exclusively}}
2462 Bar::sbar(b1); // expected-warning {{calling function 'sbar' requires holding mutex 'b1->mu_' exclusively}}
2463 Bar::sbar2(b1); // expected-warning {{calling function 'sbar2' requires holding mutex 'b1->mu_' exclusively}}
2470 // expected-warning {{calling function 'bar2' requires holding mutex 'b2->mu_' exclusively}} \
2485 // Sanity check -- lock the mutex directly, but use attributes that call getMu()
2486 // Also lock the mutex using getFooMu, which calls a lock_returned function.
2508 Mutex mu_;
2536 a = 1; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
2542 rlock.Release(); // expected-warning {{releasing mutex 'mu_' that was not held}}
2551 rlock.Release(); // expected-warning {{releasing mutex 'mu_' that was not held}}
2562 Mutex mu1_;
2563 Mutex mu2_;
2592 Mutex mu_;
2616 Mutex mutex_;
2618 void foo1() EXCLUSIVE_LOCKS_REQUIRED(mutex_) { // expected-note {{mutex acquired here}}
2620 } // expected-warning {{expecting mutex 'mutex_' to be held at the end of function}}
2623 void foo2() SHARED_LOCKS_REQUIRED(mutex_) { // expected-note {{mutex acquired here}}
2625 } // expected-warning {{expecting mutex 'mutex_' to be held at the end of function}}
2636 WTF_ScopedLockable(Mutex* mu) EXCLUSIVE_LOCK_FUNCTION(mu);
2646 Mutex mu_;
2658 WTF_ScopedLockable wtf(&mu_); // expected-note {{mutex acquired here}}
2659 } // expected-warning {{mutex 'mu_' is still held at the end of function}}
2680 WTF_ScopedLockable wtf(&mu_); // expected-note {{mutex acquired here}}
2682 } // expected-warning {{mutex 'mu_' is not held on every path through here}}
2689 WTF_ScopedLockable wtf(&mu_); // expected-note {{mutex acquired here}}
2691 } // expected-warning {{mutex 'mu_' is not held on every path through here}}
2704 SmartPtr<Mutex> getMutexPtr();
2715 int b = a; // expected-warning {{reading variable 'a' requires holding mutex 'getMutexPtr()'}}
2726 SmartPtr<Mutex> mu_;
2746 a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
2747 b = 0; // expected-warning {{writing variable 'b' requires holding mutex 'mu_' exclusively}}
2748 c = 0; // expected-warning {{writing variable 'c' requires holding mutex 'mu_' exclusively}}
2832 mu_.get()->Lock(); // expected-warning {{acquiring mutex 'mu_' that is already held}}
2833 (*mu_).Lock(); // expected-warning {{acquiring mutex 'mu_' that is already held}}
2835 Unlock(); // expected-warning {{releasing mutex 'mu_' that was not held}}
2850 foo->a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'foo->mu_' exclusively}}
2851 (*foo).b = 0; // expected-warning {{writing variable 'b' requires holding mutex 'foo->mu_' exclusively}}
2852 foo.get()->c = 0; // expected-warning {{writing variable 'c' requires holding mutex 'foo->mu_' exclusively}}
2889 Mutex mu1_;
2890 Mutex mu2_;
2891 Mutex mu3_;
2966 foo.lock(); // expected-warning {{acquiring mutex 'foo' that is already held}}
2968 foo.unlock(); // expected-warning {{releasing mutex 'foo' that was not held}}
2979 foo.lock1(); // expected-warning {{acquiring mutex 'foo.mu1_' that is already held}}
2982 foo.unlock1(); // expected-warning {{releasing mutex 'foo.mu1_' that was not held}}
2993 foo.slock1(); // expected-warning {{acquiring mutex 'foo.mu1_' that is already held}}
2996 foo.unlock1(); // expected-warning {{releasing mutex 'foo.mu1_' that was not held}}
3011 // expected-warning {{acquiring mutex 'foo.mu1_' that is already held}} \
3012 // expected-warning {{acquiring mutex 'foo.mu2_' that is already held}} \
3013 // expected-warning {{acquiring mutex 'foo.mu3_' that is already held}}
3019 // expected-warning {{releasing mutex 'foo.mu1_' that was not held}} \
3020 // expected-warning {{releasing mutex 'foo.mu2_' that was not held}} \
3021 // expected-warning {{releasing mutex 'foo.mu3_' that was not held}}
3035 // expected-warning {{acquiring mutex 'foo.mu1_' that is already held}} \
3036 // expected-warning {{acquiring mutex 'foo.mu2_' that is already held}} \
3037 // expected-warning {{acquiring mutex 'foo.mu3_' that is already held}}
3043 // expected-warning {{releasing mutex 'foo.mu1_' that was not held}} \
3044 // expected-warning {{releasing mutex 'foo.mu2_' that was not held}} \
3045 // expected-warning {{releasing mutex 'foo.mu3_' that was not held}}
3055 Mutex mu_;
3060 Mutex* tryLockMutexP() EXCLUSIVE_TRYLOCK_FUNCTION(1, mu_);
3070 a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
3092 a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
3099 a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
3111 a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
3122 a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
3127 a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
3142 Mutex mu_;
3163 n1.a = 0; // expected-warning {{writing variable 'a' requires holding mutex '&ExistentialPatternMatching::Graph::mu_' exclusively}}
3164 n1.foo(); // expected-warning {{calling function 'foo' requires holding mutex '&ExistentialPatternMatching::Graph::mu_' exclusively}}
3170 n1.foo2(); // expected-warning {{cannot call function 'foo2' while mutex '&ExistentialPatternMatching::Graph::mu_' is held}}
3176 n1.foo2(); // expected-warning {{cannot call function 'foo2' while mutex '&ExistentialPatternMatching::Graph::mu_' is held}}
3182 n1.foo2(); // expected-warning {{cannot call function 'foo2' while mutex '&ExistentialPatternMatching::Graph::mu_' is held}}
3192 g1.mu_.Lock(); // expected-warning {{acquiring mutex 'g1.mu_' that is already held}}
3203 Mutex mu_;
3231 const Mutex& getLock(const Inner* i);
3242 Mutex lock_;
3247 const Mutex& Base::getLock(const Inner* i) LOCK_RETURNED(i->lock_) {
3273 Mutex mu_;
3293 Mutex mu_;
3320 // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
3322 // expected-warning {{releasing mutex '*' that was not held}}
3370 Mutex* get_mutex() LOCK_RETURNED(mutex_) { return &mutex_; }
3372 Mutex mutex_;
3391 Mutex mu_;
3430 static Mutex mu_;
3440 static Mutex mu_;
3450 Foo f; // expected-warning {{calling function 'Foo' requires holding mutex 'mu_' exclusively}}
3451 int a = f[0]; // expected-warning {{calling function 'operator[]' requires holding mutex 'mu_' exclusively}}
3452 } // expected-warning {{calling function '~Foo' requires holding mutex 'mu_' exclusively}}
3458 Bar b; // expected-warning {{cannot call function 'Bar' while mutex 'mu_' is held}}
3459 int a = b[0]; // expected-warning {{cannot call function 'operator[]' while mutex 'mu_' is held}}
3460 } // expected-warning {{cannot call function '~Bar' while mutex 'mu_' is held}}
3478 Mutex fatalmu_;
3510 virtual Mutex* getMutex() = 0;
3515 Mutex* getMutex();
3520 Mutex* getMutex();
3525 Mutex* getMutex(); // overrides Base::getMutex()
3542 Mutex* mu_;
3559 // expected-warning {{calling function 'elr' requires holding mutex 'cell.mu_' exclusively}}
3572 // expected-warning {{calling function 'globalELR' requires holding mutex 'cell.mu_' exclusively}}
3593 // expected-warning {{calling function 'globalELR2' requires holding mutex 'cell.mu_' exclusively}}
3610 // expected-warning {{calling function 'elr' requires holding mutex 'cell.mu_' exclusively}}
3625 Mutex mu_;
3653 Mutex mu1_;
3654 Mutex mu2_;
3798 // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
3800 // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
3803 // expected-warning {{reading variable 'datap1_' requires holding mutex 'mu_'}}
3805 // expected-warning {{reading variable 'datap1_' requires holding mutex 'mu_'}}
3808 // expected-warning {{reading the value pointed to by 'datap2_' requires holding mutex 'mu_'}}
3810 // expected-warning {{reading the value pointed to by 'datap2_' requires holding mutex 'mu_'}}
3813 // expected-warning {{reading the value pointed to by 'datap2_' requires holding mutex 'mu_'}}
3815 // expected-warning {{reading the value pointed to by 'datap2_' requires holding mutex 'mu_'}}
3833 data_ = Data(1); // expected-warning {{writing variable 'data_' requires holding mutex 'mu_' exclusively}}
3834 *datap1_ = data_; // expected-warning {{reading variable 'datap1_' requires holding mutex 'mu_'}} \
3835 // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
3836 *datap2_ = data_; // expected-warning {{writing the value pointed to by 'datap2_' requires holding mutex 'mu_' exclusively}} \
3837 // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
3838 data_ = *datap1_; // expected-warning {{writing variable 'data_' requires holding mutex 'mu_' exclusively}} \
3839 // expected-warning {{reading variable 'datap1_' requires holding mutex 'mu_'}}
3840 data_ = *datap2_; // expected-warning {{writing variable 'data_' requires holding mutex 'mu_' exclusively}} \
3841 // expected-warning {{reading the value pointed to by 'datap2_' requires holding mutex 'mu_'}}
3843 data_[0] = 0; // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
3844 (*datap2_)[0] = 0; // expected-warning {{reading the value pointed to by 'datap2_' requires holding mutex 'mu_'}}
3846 data_(); // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
3851 Data mydat(data_); // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
3854 //showDataCell(data_); // xpected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
3855 //showDataCell(*datap2_); // xpected-warning {{reading the value pointed to by 'datap2_' requires holding mutex 'mu_'}}
3857 int a = data_[0]; // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
3861 Mutex mu_;
3890 Mutex cell_mu_;
3896 Mutex mu_;
3901 foo.myMethod(); // expected-warning {{reading variable 'foo' requires holding mutex 'mu_'}}
3903 int fa = foo.a; // expected-warning {{reading variable 'foo' requires holding mutex 'mu_'}}
3904 foo.a = fa; // expected-warning {{writing variable 'foo' requires holding mutex 'mu_' exclusively}}
3906 fa = foop->a; // expected-warning {{reading the value pointed to by 'foop' requires holding mutex 'mu_'}}
3907 foop->a = fa; // expected-warning {{writing the value pointed to by 'foop' requires holding mutex 'mu_' exclusively}}
3909 fa = (*foop).a; // expected-warning {{reading the value pointed to by 'foop' requires holding mutex 'mu_'}}
3910 (*foop).a = fa; // expected-warning {{writing the value pointed to by 'foop' requires holding mutex 'mu_' exclusively}}
3912 foo.c = Cell(0); // expected-warning {{writing variable 'foo' requires holding mutex 'mu_'}} \
3913 // expected-warning {{writing variable 'c' requires holding mutex 'foo.cell_mu_' exclusively}}
3914 foo.c.cellMethod(); // expected-warning {{reading variable 'foo' requires holding mutex 'mu_'}} \
3915 // expected-warning {{reading variable 'c' requires holding mutex 'foo.cell_mu_'}}
3917 foop->c = Cell(0); // expected-warning {{writing the value pointed to by 'foop' requires holding mutex 'mu_'}} \
3918 // expected-warning {{writing variable 'c' requires holding mutex 'foop->cell_mu_' exclusively}}
3919 foop->c.cellMethod(); // expected-warning {{reading the value pointed to by 'foop' requires holding mutex 'mu_'}} \
3920 // expected-warning {{reading variable 'c' requires holding mutex 'foop->cell_mu_'}}
3922 (*foop).c = Cell(0); // expected-warning {{writing the value pointed to by 'foop' requires holding mutex 'mu_'}} \
3923 // expected-warning {{writing variable 'c' requires holding mutex 'foop->cell_mu_' exclusively}}
3924 (*foop).c.cellMethod(); // expected-warning {{reading the value pointed to by 'foop' requires holding mutex 'mu_'}} \
3925 // expected-warning {{reading variable 'c' requires holding mutex 'foop->cell_mu_'}}
3935 Mutex mu_;
3955 static inline Mutex* getMutex1();
3956 static inline Mutex* getMutex2();
3975 Mutex mu_;
3995 void lockBad() EXCLUSIVE_LOCK_FUNCTION(mu_) { // expected-note {{mutex acquired here}}
3998 } // expected-warning {{expecting mutex 'mu_' to be held at the end of function}}
4000 void readerLockBad() SHARED_LOCK_FUNCTION(mu_) { // expected-note {{mutex acquired here}}
4003 } // expected-warning {{expecting mutex 'mu_' to be held at the end of function}}
4005 void unlockBad() UNLOCK_FUNCTION(mu_) { // expected-note {{mutex acquired here}}
4008 } // expected-warning {{mutex 'mu_' is still held at the end of function}}
4011 void lockBad2() EXCLUSIVE_LOCK_FUNCTION(mu_) { // expected-note {{mutex acquired here}}
4012 mu2_.Lock(); // expected-note {{mutex acquired here}}
4013 } // expected-warning {{expecting mutex 'mu_' to be held at the end of function}} \
4014 // expected-warning {{mutex 'mu2_' is still held at the end of function}}
4017 void readerLockBad2() SHARED_LOCK_FUNCTION(mu_) { // expected-note {{mutex acquired here}}
4018 mu2_.ReaderLock(); // expected-note {{mutex acquired here}}
4019 } // expected-warning {{expecting mutex 'mu_' to be held at the end of function}} \
4020 // expected-warning {{mutex 'mu2_' is still held at the end of function}}
4023 void unlockBad2() UNLOCK_FUNCTION(mu_) { // expected-note {{mutex acquired here}}
4024 mu2_.Unlock(); // expected-warning {{releasing mutex 'mu2_' that was not held}}
4025 } // expected-warning {{mutex 'mu_' is still held at the end of function}}
4028 Mutex mu_;
4029 Mutex mu2_;
4041 Mutex mu_;
4052 a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
4111 mu_.Lock(); // expected-note {{mutex acquired here}}
4113 } // expected-warning {{mutex 'mu_' is still held at the end of function}}
4117 mu_.Lock(); // expected-note {{mutex acquired here}}
4122 } // expected-warning {{mutex 'mu_' is still held at the end of function}}
4140 Mutex mu;
4238 Mutex mu1;
4239 Mutex mu2;
4259 if (*a == 0) doSomething(); // expected-warning {{reading the value pointed to by 'a' requires holding mutex 'mu2'}}
4260 *a = 0; // expected-warning {{writing the value pointed to by 'a' requires holding mutex 'mu2' exclusively}}
4262 if (c->a == 0) doSomething(); // expected-warning {{reading the value pointed to by 'c' requires holding mutex 'mu2'}}
4263 c->a = 0; // expected-warning {{writing the value pointed to by 'c' requires holding mutex 'mu2' exclusively}}
4265 if ((*c).a == 0) doSomething(); // expected-warning {{reading the value pointed to by 'c' requires holding mutex 'mu2'}}
4266 (*c).a = 0; // expected-warning {{writing the value pointed to by 'c' requires holding mutex 'mu2' exclusively}}
4268 if (a[0] == 42) doSomething(); // expected-warning {{reading the value pointed to by 'a' requires holding mutex 'mu2'}}
4269 a[0] = 57; // expected-warning {{writing the value pointed to by 'a' requires holding mutex 'mu2' exclusively}}
4270 if (c[0].a == 42) doSomething(); // expected-warning {{reading the value pointed to by 'c' requires holding mutex 'mu2'}}
4271 c[0].a = 57; // expected-warning {{writing the value pointed to by 'c' requires holding mutex 'mu2' exclusively}}
4277 if (*a == 0) doSomething(); // expected-warning {{reading variable 'a' requires holding mutex 'mu1'}}
4278 *a = 0; // expected-warning {{reading variable 'a' requires holding mutex 'mu1'}}
4280 if (c->a == 0) doSomething(); // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
4281 c->a = 0; // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
4283 if ((*c).a == 0) doSomething(); // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
4284 (*c).a = 0; // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
4286 if (a[0] == 42) doSomething(); // expected-warning {{reading variable 'a' requires holding mutex 'mu1'}}
4287 a[0] = 57; // expected-warning {{reading variable 'a' requires holding mutex 'mu1'}}
4288 if (c[0].a == 42) doSomething(); // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
4289 c[0].a = 57; // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
4294 if (sa[0] == 42) doSomething(); // expected-warning {{reading variable 'sa' requires holding mutex 'mu1'}}
4295 sa[0] = 57; // expected-warning {{writing variable 'sa' requires holding mutex 'mu1' exclusively}}
4296 mutex 'mu1'}}
4297 sc[0].a = 57; // expected-warning {{writing variable 'sc' requires holding mutex 'mu1' exclusively}}
4299 if (*sa == 42) doSomething(); // expected-warning {{reading variable 'sa' requires holding mutex 'mu1'}}
4300 *sa = 57; // expected-warning {{writing variable 'sa' requires holding mutex 'mu1' exclusively}}
4301 if ((*sc).a == 42) doSomething(); // expected-warning {{reading variable 'sc' requires holding mutex 'mu1'}}
4302 (*sc).a = 57; // expected-warning {{writing variable 'sc' requires holding mutex 'mu1' exclusively}}
4303 if (sc->a == 42) doSomething(); // expected-warning {{reading variable 'sc' requires holding mutex 'mu1'}}
4304 sc->a = 57; // expected-warning {{writing variable 'sc' requires holding mutex 'mu1' exclusively}}
4325 Mutex mu1;
4326 Mutex mu2;
4349 sp.get(); // expected-warning {{reading variable 'sp' requires holding mutex 'mu1'}}
4350 if (*sp == 0) doSomething(); // expected-warning {{reading variable 'sp' requires holding mutex 'mu1'}}
4351 *sp = 0; // expected-warning {{reading variable 'sp' requires holding mutex 'mu1'}}
4352 sq->a = 0; // expected-warning {{reading variable 'sq' requires holding mutex 'mu1'}}
4354 if (sp[0] == 0) doSomething(); // expected-warning {{reading variable 'sp' requires holding mutex 'mu1'}}
4355 sp[0] = 0; // expected-warning {{reading variable 'sp' requires holding mutex 'mu1'}}
4356 if (sq[0].a == 0) doSomething(); // expected-warning {{reading variable 'sq' requires holding mutex 'mu1'}}
4357 sq[0].a = 0; // expected-warning {{reading variable 'sq' requires holding mutex 'mu1'}}
4366 if (*sp == 0) doSomething(); // expected-warning {{reading the value pointed to by 'sp' requires holding mutex 'mu2'}}
4367 *sp = 0; // expected-warning {{reading the value pointed to by 'sp' requires holding mutex 'mu2'}}
4368 sq->a = 0; // expected-warning {{reading the value pointed to by 'sq' requires holding mutex 'mu2'}}
4370 if (sp[0] == 0) doSomething(); // expected-warning {{reading the value pointed to by 'sp' requires holding mutex 'mu2'}}
4371 sp[0] = 0; // expected-warning {{reading the value pointed to by 'sp' requires holding mutex 'mu2'}}
4372 if (sq[0].a == 0) doSomething(); // expected-warning {{reading the value pointed to by 'sq' requires holding mutex 'mu2'}}
4373 sq[0].a = 0; // expected-warning {{reading the value pointed to by 'sq' requires holding mutex 'mu2'}}
4386 (RunHelper)(); // expected-warning {{calling function 'RunHelper' requires holding mutex 'M' exclusively}}
4390 Mutex M;
4413 Mutex mu_;
4430 func1(); // expected-warning {{calling function 'operator()' requires holding mutex 'mu_' exclusively}}
4446 Mutex* getMu() LOCK_RETURNED("");
4447 Mutex* getUniv() LOCK_RETURNED("*");
4457 void foo(Mutex* mu) EXCLUSIVE_LOCKS_REQUIRED(mu);
4466 struct MuCell { Mutex* mu; };
4468 MyMap<MyString, Mutex*> map;
4489 SmartPtr<Mutex> mu;
4494 bool result = (a.val == b.val); // expected-warning {{reading variable 'val' requires holding mutex 'b.mu'}} \
4503 SmartPtr<Mutex> mu;
4553 Mutex* getMutex(Opaque* o) LOCK_RETURNED("");
4565 Mutex mu;
4578 Mutex mu;
4584 baz(); // expected-warning {{cannot call function 'baz' while mutex 'mu' is held}}
4630 dispatch_log("wrong"); /* expected-warning {{cannot call function 'dispatch_log' while mutex 'FlightControl' is held}} */
4673 Mutex mu;
4693 Mutex mu;
4700 int b = a; // expected-warning {{reading variable 'a' requires holding mutex 'mu'}}
4705 auto b = a; // expected-warning {{reading variable 'a' requires holding mutex 'mu'}}
4708 c = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu' exclusively}}
4715 b = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu' exclusively}}
4716 c = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu' exclusively}}
4717 d = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu' exclusively}}
4720 rs.a = 0; // expected-warning {{writing variable 's' requires holding mutex 'mu' exclusively}}
4723 rarr[2] = 0; // expected-warning {{writing variable 'arr' requires holding mutex 'mu' exclusively}}
4733 for (int i : cntr) { // expected-warning2 {{reading variable 'cntr' requires holding mutex 'mu'}}
4778 Mutex mu;
4799 copy(foo); // expected-warning {{reading variable 'foo' requires holding mutex 'mu'}}
4800 write1(foo); // expected-warning {{passing variable 'foo' by reference requires holding mutex 'mu'}}
4801 write2(10, foo); // expected-warning {{passing variable 'foo' by reference requires holding mutex 'mu'}}
4802 read1(foo); // expected-warning {{passing variable 'foo' by reference requires holding mutex 'mu'}}
4803 read2(10, foo); // expected-warning {{passing variable 'foo' by reference requires holding mutex 'mu'}}
4804 destroy(mymove(foo)); // expected-warning {{passing variable 'foo' by reference requires holding mutex 'mu'}}
4806 mwrite1(foo); // expected-warning {{passing variable 'foo' by reference requires holding mutex 'mu'}}
4807 mwrite2(10, foo); // expected-warning {{passing variable 'foo' by reference requires holding mutex 'mu'}}
4808 mread1(foo); // expected-warning {{passing variable 'foo' by reference requires holding mutex 'mu'}}
4809 mread2(10, foo); // expected-warning {{passing variable 'foo' by reference requires holding mutex 'mu'}}
4811 smwrite1(foo); // expected-warning {{passing variable 'foo' by reference requires holding mutex 'mu'}}
4812 smwrite2(10, foo); // expected-warning {{passing variable 'foo' by reference requires holding mutex 'mu'}}
4813 smread1(foo); // expected-warning {{passing variable 'foo' by reference requires holding mutex 'mu'}}
4814 smread2(10, foo); // expected-warning {{passing variable 'foo' by reference requires holding mutex 'mu'}}
4816 foo + foo2; // expected-warning {{reading variable 'foo' requires holding mutex 'mu'}} \
4817 // expected-warning {{passing variable 'foo2' by reference requires holding mutex 'mu'}}
4818 foo / foo2; // expected-warning {{reading variable 'foo' requires holding mutex 'mu'}} \
4819 // expected-warning {{passing variable 'foo2' by reference requires holding mutex 'mu'}}
4820 foo * foo2; // expected-warning {{reading variable 'foo' requires holding mutex 'mu'}} \
4821 // expected-warning {{passing variable 'foo2' by reference requires holding mutex 'mu'}}
4822 foo[foo2]; // expected-warning {{reading variable 'foo' requires holding mutex 'mu'}} \
4823 // expected-warning {{passing variable 'foo2' by reference requires holding mutex 'mu'}}
4824 (*this) << foo; // expected-warning {{passing variable 'foo' by reference requires holding mutex 'mu'}}
4826 copy(*foop); // expected-warning {{reading the value pointed to by 'foop' requires holding mutex 'mu'}}
4827 write1(*foop); // expected-warning {{passing the value that 'foop' points to by reference requires holding mutex 'mu'}}
4828 write2(10, *foop); // expected-warning {{passing the value that 'foop' points to by reference requires holding mutex 'mu'}}
4829 read1(*foop); // expected-warning {{passing the value that 'foop' points to by reference requires holding mutex 'mu'}}
4830 mutex 'mu'}}
4831 destroy(mymove(*foop)); // expected-warning {{passing the value that 'foop' points to by reference requires holding mutex 'mu'}}
4833 copy(*foosp); // expected-warning {{reading the value pointed to by 'foosp' requires holding mutex 'mu'}}
4834 write1(*foosp); // expected-warning {{reading the value pointed to by 'foosp' requires holding mutex 'mu'}}
4835 write2(10, *foosp); // expected-warning {{reading the value pointed to by 'foosp' requires holding mutex 'mu'}}
4836 read1(*foosp); // expected-warning {{reading the value pointed to by 'foosp' requires holding mutex 'mu'}}
4837 read2(10, *foosp); // expected-warning {{reading the value pointed to by 'foosp' requires holding mutex 'mu'}}
4838 destroy(mymove(*foosp)); // expected-warning {{reading the value pointed to by 'foosp' requires holding mutex 'mu'}}
4857 Mutex mu1 ACQUIRED_BEFORE(mu2, mu3);
4858 Mutex mu2;
4859 Mutex mu3;
4873 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu2'}}
4880 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu3'}}
4891 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu2'}}
4906 Mutex mu1;
4907 Mutex mu2 ACQUIRED_AFTER(mu1);
4908 Mutex mu3 ACQUIRED_AFTER(mu1);
4922 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu2'}}
4929 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu3'}}
4937 Mutex mu1 ACQUIRED_BEFORE(mu2);
4938 Mutex mu2;
4939 Mutex mu3 ACQUIRED_AFTER(mu2) ACQUIRED_BEFORE(mu4);
4940 Mutex mu4;
4956 mu2.Lock(); // expected-warning {{mutex 'mu2' must be acquired before 'mu4'}}
4964 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu4'}}
4972 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu3'}}
4982 Mutex mu1;
4983 Mutex mu2 ACQUIRED_AFTER(mu1);
4984 Mutex mu3 ACQUIRED_AFTER(mu1);
4985 Mutex mu4 ACQUIRED_AFTER(mu2, mu3);
4986 Mutex mu5 ACQUIRED_AFTER(mu4);
4987 Mutex mu6 ACQUIRED_AFTER(mu4);
4988 Mutex mu7 ACQUIRED_AFTER(mu5, mu6);
4989 Mutex mu8 ACQUIRED_AFTER(mu7);
4993 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu8'}}
5002 Mutex mu1 ACQUIRED_BEFORE(mu2, mu3);
5003 Mutex mu2 ACQUIRED_BEFORE(mu4);
5004 Mutex mu3 ACQUIRED_BEFORE(mu4);
5005 Mutex mu4 ACQUIRED_BEFORE(mu5, mu6);
5006 Mutex mu5 ACQUIRED_BEFORE(mu7);
5007 Mutex mu6 ACQUIRED_BEFORE(mu7);
5008 Mutex mu7 ACQUIRED_BEFORE(mu8);
5009 Mutex mu8;
5013 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu8'}}
5021 Mutex mu1 ACQUIRED_AFTER(mu3); // expected-warning {{Cycle in acquired_before/after dependencies, starting with 'mu1'}}
5022 Mutex mu2 ACQUIRED_AFTER(mu1); // expected-warning {{Cycle in acquired_before/after dependencies, starting with 'mu2'}}
5023 Mutex mu3 ACQUIRED_AFTER(mu2); // expected-warning {{Cycle in acquired_before/after dependencies, starting with 'mu3'}}
5025 Mutex mu_b ACQUIRED_BEFORE(mu_b); // expected-warning {{Cycle in acquired_before/after dependencies, starting with 'mu_b'}}
5026 Mutex mu_a ACQUIRED_AFTER(mu_a); // expected-warning {{Cycle in acquired_before/after dependencies, starting with 'mu_a'}}
5066 Mutex mu;
5080 void test3() EXCLUSIVE_LOCKS_REQUIRED(mu) { // expected-note {{mutex acquired here}}
5083 } // expected-warning {{expecting mutex 'mu' to be held at the end of function}}
5085 void test4() SHARED_LOCKS_REQUIRED(mu) { // expected-note {{mutex acquired here}}
5088 } // expected-warning {{expecting mutex 'mu' to be held at the end of function}}
5124 Mutex mu;
5150 Mutex mu1;
5151 Mutex mu2 ACQUIRED_AFTER(mu1);
5155 mu1.Lock(); // expected-warning {{mutex 'mu1' must be acquired before 'mu2'}}
5178 muun1.Lock(); // expected-warning {{mutex 'muun1' must be acquired before 'muun2'}}
5189 } // expected-warning {{mutex 'lock_' is still held at the end of function}}
5190 Mutex lock_ ACQUIRED_BEFORE("");