diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
commit | 45b533945f0851ec234ca846e1af5ee1e4df0b6e (patch) | |
tree | 0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /test/Modules/thread-safety.cpp | |
parent | 7e86edd64bfae4e324224452e4ea879b3371a4bd (diff) |
Vendor import of clang trunk r256633:vendor/clang/clang-trunk-r256633
Diffstat (limited to 'test/Modules/thread-safety.cpp')
-rw-r--r-- | test/Modules/thread-safety.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Modules/thread-safety.cpp b/test/Modules/thread-safety.cpp new file mode 100644 index 000000000000..e6e85d284c82 --- /dev/null +++ b/test/Modules/thread-safety.cpp @@ -0,0 +1,18 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fimplicit-module-maps \ +// RUN: -I%S/Inputs/thread-safety -std=c++11 -Wthread-safety \ +// RUN: -verify %s +// +// expected-no-diagnostics + +#include "b.h" +#include "c.h" + +bool g(); +void X::f() { + m.lock(); + if (g()) + m.unlock(); + else + unlock(*this); +} |