19 lines · cpp
1// RUN: rm -rf %t2// 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 %s5//6// expected-no-diagnostics7 8#include "b.h"9#include "c.h"10 11bool g();12void X::f() {13 m.lock();14 if (g())15 m.unlock();16 else17 unlock(*this);18}19