| 1 |
// RUN: not %clang_cc1 -triple x86_64-unknown-unknown -frecovery-ast -frecovery-ast-type -fblocks -ast-dump %s | FileCheck -strict-whitespace %s |
| 2 |
|
| 3 |
@interface Foo |
| 4 |
- (void)method:(int)n; |
| 5 |
@end |
| 6 |
|
| 7 |
void k(Foo *foo) { |
| 8 |
// CHECK: ObjCMessageExpr {{.*}} 'void' contains-errors |
| 9 |
// CHECK-CHECK: |-ImplicitCastExpr {{.*}} 'Foo *' <LValueToRValue> |
| 10 |
// CHECK-CHECK: | `-DeclRefExpr {{.*}} 'foo' |
| 11 |
// CHECK-CHECK: `-RecoveryExpr {{.*}} |
| 12 |
[foo method:undef]; |
| 13 |
|
| 14 |
// CHECK: ImplicitCastExpr {{.*}} '<dependent type>' contains-errors |
| 15 |
// CHECK-NEXT: `-RecoveryExpr {{.*}} '<dependent type>' contains-errors |
| 16 |
// CHECK-NEXT: `-DeclRefExpr {{.*}} 'foo' |
| 17 |
foo.undef; |
| 18 |
} |
| 19 |
|
| 20 |
// CHECK: |-VarDecl {{.*}} 'int (^)()' cinit |
| 21 |
// CHECK-NEXT: | `-RecoveryExpr {{.*}} '<dependent type> (^)(void)' contains-errors lvalue |
| 22 |
// CHECK-NEXT: | `-BlockExpr {{.*}} '<dependent type> (^)(void)' |
| 23 |
// CHECK-NEXT: | `-BlockDecl {{.*}} invalid |
| 24 |
int (^gh63863)() = ^() { |
| 25 |
return undef; |
| 26 |
}; |
| 27 |
|
| 28 |
// CHECK: `-BlockExpr {{.*}} 'int (^)(int, int)' |
| 29 |
// CHECK-NEXT: `-BlockDecl {{.*}} invalid |
| 30 |
int (^gh64005)(int, int) = ^(int, undefined b) { |
| 31 |
return 1; |
| 32 |
}; |