// Test this without pch.
// RUN: %clang_cc1 -include %s -fsyntax-only -verify -Wthread-safety -std=c++11 %s
// Test with pch.
// RUN: %clang_cc1 -emit-pch -o %t %s -std=c++11
// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify -Wthread-safety -std=c++11 %s
;
;
;
;
// The universal lock, written "*", allows checking to be selectively turned
// off for a particular piece of code.
void ;
void ;
void ;
void ;
// For testing handling of smart pointers.
;
// For testing destructor calls and cleanup.
;
Mutex sls_mu;
Mutex sls_mu2 ;
int sls_guard_var = 0;
int sls_guardby_var = 0;
bool ;
;
MutexWrapper sls_mw;
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void // expected-warning{{mutex 'sls_mu' is still held at the end of function}}
void // expected-warning{{mutex 'sls_mu' is not held on every path through here}} \
// expected-warning{{mutex 'sls_mu2' is not held on every path through here}}
void // expected-warning{{mutex 'sls_mu' is not held on every path through here}}
void
void
void
void
void // expected-warning{{mutex 'sls_mu' is still held at the end of function}}
void
void