aboutsummaryrefslogtreecommitdiffstats
path: root/test/Analysis/dispatch-once.m
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-02-05 19:37:40 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-02-05 19:37:40 +0000
commitb3090384227bf61f889b6aaf4230eccaacc85514 (patch)
tree6d36474d5d489e49c094ba806b8b9a65309592bc /test/Analysis/dispatch-once.m
parent123063377428540752bad91c7fbd536a762e31bd (diff)
downloadsrc-b3090384227bf61f889b6aaf4230eccaacc85514.tar.gz
src-b3090384227bf61f889b6aaf4230eccaacc85514.zip
Vendor import of clang release_40 branch r294123:vendor/clang/clang-release_40-r294123
Notes
Notes: svn path=/vendor/clang/dist/; revision=313291 svn path=/vendor/clang/clang-release_40-r294123/; revision=313292; tag=vendor/clang/clang-release_40-r294123
Diffstat (limited to 'test/Analysis/dispatch-once.m')
-rw-r--r--test/Analysis/dispatch-once.m7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Analysis/dispatch-once.m b/test/Analysis/dispatch-once.m
index 7d54147aebe2..2f82718663e5 100644
--- a/test/Analysis/dispatch-once.m
+++ b/test/Analysis/dispatch-once.m
@@ -107,3 +107,10 @@ void test_block_var_from_outside_block() {
};
dispatch_once(&once, ^{}); // expected-warning{{Call to 'dispatch_once' uses the block variable 'once' for the predicate value.}}
}
+
+void test_static_var_from_outside_block() {
+ static dispatch_once_t once;
+ ^{
+ dispatch_once(&once, ^{}); // no-warning
+ };
+}