repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git]
/
clang
/
test
/
Modules
/
thread-safety.cpp
blob
e6e85d284c82015905758d39c3e31ddac1cbc4ce
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
}