llvm-for-llvmta/tools/clang/test/AST/ast-dump-recovery.m

19 lines
657 B
Mathematica
Raw Permalink Normal View History

2022-04-25 13:02:35 +02:00
// RUN: not %clang_cc1 -triple x86_64-unknown-unknown -frecovery-ast -frecovery-ast-type -ast-dump %s | FileCheck -strict-whitespace %s
@interface Foo
- (void)method:(int)n;
@end
void k(Foo *foo) {
// CHECK: ObjCMessageExpr {{.*}} 'void' contains-errors
// CHECK-CHECK: |-ImplicitCastExpr {{.*}} 'Foo *' <LValueToRValue>
// CHECK-CHECK: | `-DeclRefExpr {{.*}} 'foo'
// CHECK-CHECK: `-RecoveryExpr {{.*}}
[foo method:undef];
// CHECK: ImplicitCastExpr {{.*}} '<dependent type>' contains-errors
// CHECK-NEXT: `-RecoveryExpr {{.*}} '<dependent type>' contains-errors
// CHECK-NEXT: `-DeclRefExpr {{.*}} 'foo'
foo.undef;
}