blob: 29966f26c82403a36e4a6f75d30501ba31854110 [file] [log] [blame]
Haojian Wu733edf92020-03-19 16:30:40 +01001int foo(int, int);
2int foo(int, double);
3int x;
4
5void 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