| 1 | // RUN: rm -rf %t |
|---|---|
| 2 | // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fimplicit-module-maps \ |
| 3 | // RUN: -I%S/Inputs/thread-safety -std=c++11 -Wthread-safety \ |
| 4 | // RUN: -verify %s |
| 5 | // |
| 6 | // expected-no-diagnostics |
| 7 | |
| 8 | #include "b.h" |
| 9 | #include "c.h" |
| 10 | |
| 11 | bool g(); |
| 12 | void X::f() { |
| 13 | m.lock(); |
| 14 | if (g()) |
| 15 | m.unlock(); |
| 16 | else |
| 17 | unlock(*this); |
| 18 | } |
| 19 |