aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjCXX/delay-parsing-func-tryblock.mm
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjCXX/delay-parsing-func-tryblock.mm')
-rw-r--r--test/SemaObjCXX/delay-parsing-func-tryblock.mm9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/SemaObjCXX/delay-parsing-func-tryblock.mm b/test/SemaObjCXX/delay-parsing-func-tryblock.mm
index ecee7be629c3..f6b849b95583 100644
--- a/test/SemaObjCXX/delay-parsing-func-tryblock.mm
+++ b/test/SemaObjCXX/delay-parsing-func-tryblock.mm
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -x objective-c++ -fcxx-exceptions -fsyntax-only -Werror -verify -Wno-objc-root-class %s
-// expected-no-diagnostics
// rdar://10387088
@interface MyClass
@@ -29,13 +28,13 @@ BadReturn::BadReturn(MyClass * myObject) try : CObj(myObject) {
try {
[myObject privateMethod];
[myObject privateMethod1];
- getMe = bar(myObject);
- [CObj privateMethod1];
+ getMe = bar(myObject); // expected-error {{cannot refer to a non-static member from the handler of a constructor function try block}}
+ [CObj privateMethod1]; // expected-error {{cannot refer to a non-static member from the handler of a constructor function try block}}
} catch(int ei) {
- i = ei;
+ i = ei; // expected-error {{cannot refer to a non-static member from the handler of a constructor function try block}}
} catch(...) {
{
- i = 0;
+ i = 0; // expected-error {{cannot refer to a non-static member from the handler of a constructor function try block}}
}
}
}