blob: e6e85d284c82015905758d39c3e31ddac1cbc4ce [file] [log] [blame]
Richard Smithdd55b952015-08-12 02:17:52 +00001// 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
11bool g();
12void X::f() {
13 m.lock();
14 if (g())
15 m.unlock();
16 else
17 unlock(*this);
18}