clang/test/AST/ast-dump-default-arg-recovery.cpp
raw| 1 | // RUN: not %clang_cc1 -triple x86_64-unknown-unknown -ast-dump -frecovery-ast %s | FileCheck %s |
| 2 | |
| 3 | void foo(); |
| 4 | void fun(int arg = foo()); |
| 5 | // CHECK: -ParmVarDecl {{.*}} <col:10, col:24> col:14 invalid arg 'int' cinit |
| 6 | // CHECK-NEXT: -RecoveryExpr {{.*}} <col:18, col:24> 'int' contains-errors |
| 7 | // Make sure we also preserve structure of the errorneous expression |
| 8 | // CHECK: -DeclRefExpr {{.*}} <col:20> 'void ()' {{.*}} 'foo' |