aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/predefined-expr.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-01-18 16:23:48 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-01-18 16:23:48 +0000
commit06d4ba388873e6d1cfa9cd715a8935ecc8cd2097 (patch)
tree3eb853da77d46cc77c4b017525a422f9ddb1385b /test/CodeGenCXX/predefined-expr.cpp
parent30d791273d07fac9c0c1641a0731191bca6e8606 (diff)
downloadsrc-06d4ba388873e6d1cfa9cd715a8935ecc8cd2097.tar.gz
src-06d4ba388873e6d1cfa9cd715a8935ecc8cd2097.zip
Notes
Diffstat (limited to 'test/CodeGenCXX/predefined-expr.cpp')
-rw-r--r--test/CodeGenCXX/predefined-expr.cpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/test/CodeGenCXX/predefined-expr.cpp b/test/CodeGenCXX/predefined-expr.cpp
index f901467c4f4b..6bdc2cec4be8 100644
--- a/test/CodeGenCXX/predefined-expr.cpp
+++ b/test/CodeGenCXX/predefined-expr.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -fblocks %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
// CHECK: private unnamed_addr constant [15 x i8] c"externFunction\00"
// CHECK: private unnamed_addr constant [26 x i8] c"void NS::externFunction()\00"
@@ -537,3 +537,33 @@ int main() {
return 0;
}
+
+// rdar://19065361
+class XXX {
+ XXX();
+ ~XXX();
+};
+
+void XXLog(const char *functionName) { }
+
+typedef void (^notify_handler_t)(int token);
+
+typedef void (^dispatch_block_t)(void);
+
+void notify_register_dispatch(notify_handler_t handler);
+
+void _dispatch_once(dispatch_block_t block);
+
+XXX::XXX()
+{
+ _dispatch_once(^{ notify_register_dispatch( ^(int token) { XXLog(__FUNCTION__); });
+ });
+}
+// CHECK: define internal void @___ZN3XXXC2Ev_block_invoke_
+
+XXX::~XXX()
+{
+ _dispatch_once(^{ notify_register_dispatch( ^(int token) { XXLog(__FUNCTION__); });
+ });
+}
+// CHECK: define internal void @___ZN3XXXD2Ev_block_invoke_