Haojian Wu | 733edf9 | 2020-03-19 16:30:40 +0100 | [diff] [blame^] | 1 | int foo(int, int); |
| 2 | int foo(int, double); |
| 3 | int x; |
| 4 | |
| 5 | void testTypedRecoveryExpr() { |
| 6 | // Inner foo() is a RecoveryExpr, outer foo() is an overloaded call. |
| 7 | foo(x, foo(x)); |
| 8 | } |
| 9 | // RUN: c-index-test -cursor-at=%s:7:3 %s -Xclang -frecovery-ast | FileCheck -check-prefix=OUTER-FOO %s |
| 10 | // OUTER-FOO: OverloadedDeclRef=foo[2:5, 1:5] |
| 11 | // RUN: c-index-test -cursor-at=%s:7:7 %s -Xclang -frecovery-ast | FileCheck -check-prefix=OUTER-X %s |
| 12 | // OUTER-X: DeclRefExpr=x:3:5 |
| 13 | // RUN: c-index-test -cursor-at=%s:7:10 %s -Xclang -frecovery-ast | FileCheck -check-prefix=INNER-FOO %s |
| 14 | // INNER-FOO: OverloadedDeclRef=foo[2:5, 1:5] |
| 15 | // RUN: c-index-test -cursor-at=%s:7:14 %s -Xclang -frecovery-ast | FileCheck -check-prefix=INNER-X %s |
| 16 | // INNER-X: DeclRefExpr=x:3:5 |