1 // RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-objc-root-class -verify %s
3 void TestObjcBlock(void) {
4 void (^x)(void) = ^(void) {
5 __attribute__((musttail)) return TestObjcBlock(); // expected-error{{'musttail' attribute cannot be used from a block}}
7 __attribute__((musttail)) return x();
10 void ReturnsVoid(void);
11 void TestObjcBlockVar(void) {
12 __block int i = 0; // expected-note{{jump exits scope of __block variable}}
13 __attribute__((musttail)) return ReturnsVoid(); // expected-error{{cannot perform a tail call from this return statement}}
16 __attribute__((objc_root_class))
17 @interface TestObjcClass
20 @implementation TestObjcClass
22 - (void)testObjCMethod {
23 __attribute__((musttail)) return ReturnsVoid(); // expected-error{{'musttail' attribute cannot be used from an Objective-C function}}