aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/blocks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/blocks.cpp')
-rw-r--r--test/CodeGenCXX/blocks.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGenCXX/blocks.cpp b/test/CodeGenCXX/blocks.cpp
index 3d7fcfddbe..eb544787da 100644
--- a/test/CodeGenCXX/blocks.cpp
+++ b/test/CodeGenCXX/blocks.cpp
@@ -211,3 +211,18 @@ namespace test7 {
return ^{ return *p; }();
}
}
+
+namespace test8 {
+ // <rdar://problem/10832617>: failure to capture this after skipping rebuild
+ // of the 'this' pointer.
+ struct X {
+ int x;
+
+ template<typename T>
+ int foo() {
+ return ^ { return x; }();
+ }
+ };
+
+ template int X::foo<int>();
+}