summaryrefslogtreecommitdiffstats
path: root/test/SemaObjCXX/blocks.mm
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjCXX/blocks.mm')
-rw-r--r--test/SemaObjCXX/blocks.mm16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/SemaObjCXX/blocks.mm b/test/SemaObjCXX/blocks.mm
index 09d614d372..3f901cc0a8 100644
--- a/test/SemaObjCXX/blocks.mm
+++ b/test/SemaObjCXX/blocks.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -Wno-objc-root-class %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -Wno-objc-root-class -std=c++11 %s
@protocol NSObject;
void bar(id(^)(void));
@@ -144,3 +144,17 @@ namespace DependentReturn {
template void f<X>(X);
}
+
+namespace MoveBlockVariable {
+struct B0 {
+};
+
+struct B1 { // expected-note 2 {{candidate constructor (the implicit}}
+ B1(B0&&); // expected-note {{candidate constructor not viable}}
+};
+
+B1 test_move() {
+ __block B0 b;
+ return b; // expected-error {{no viable conversion from returned value of type 'MoveBlockVariable::B0' to function return type 'MoveBlockVariable::B1'}}
+}
+}