From bfef399519ca9b8a4b4c6b563253bad7e0eeffe0 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 22 Dec 2013 00:07:40 +0000 Subject: Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3): https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841 --- test/Analysis/templates.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'test/Analysis/templates.cpp') diff --git a/test/Analysis/templates.cpp b/test/Analysis/templates.cpp index faa5c1a76209..131794a7c931 100644 --- a/test/Analysis/templates.cpp +++ b/test/Analysis/templates.cpp @@ -48,3 +48,25 @@ void testNonTypeTemplateInstantiation() { #endif } +namespace rdar13954714 { + template + bool blockInTemplate() { + return (^() { + return VALUE; + })(); + } + + // force instantiation + template bool blockInTemplate(); + + template + void blockWithStatic() { + (void)^() { + static int x; + return ++x; + }; + } + + // force instantiation + template void blockWithStatic(); +} -- cgit v1.2.3