Douglas Gregor | b657f11 | 2009-09-22 21:11:38 +0000 | [diff] [blame] | 1 | // Note: the run lines follow their respective tests, since line/column |
| 2 | // matter in this test. |
Douglas Gregor | 9c6a0e9 | 2009-09-22 15:41:20 +0000 | [diff] [blame] | 3 | void f(float x, float y); |
| 4 | void f(int i, int j, int k); |
| 5 | struct X { }; |
| 6 | void f(X); |
| 7 | namespace N { |
| 8 | struct Y { |
| 9 | Y(int = 0); |
| 10 | |
| 11 | operator int() const; |
| 12 | }; |
Douglas Gregor | 0594438 | 2009-09-23 00:16:58 +0000 | [diff] [blame] | 13 | void f(Y y, int ZZ); |
Douglas Gregor | 9c6a0e9 | 2009-09-22 15:41:20 +0000 | [diff] [blame] | 14 | } |
| 15 | typedef N::Y Y; |
| 16 | void f(); |
| 17 | |
| 18 | void test() { |
Douglas Gregor | b657f11 | 2009-09-22 21:11:38 +0000 | [diff] [blame] | 19 | f(Y(), 0, 0); |
| 20 | // RUN: clang-cc -fsyntax-only -code-completion-at=%s:19:9 %s -o - | FileCheck -check-prefix=CC1 %s && |
Douglas Gregor | 86d802e | 2009-09-23 00:34:09 +0000 | [diff] [blame^] | 21 | // CHECK-CC1: f(struct N::Y y, <#int ZZ#>) |
| 22 | // CHECK-NEXT-CC1: f(int i, <#int j#>, int k) |
| 23 | // CHECK-NEXT-CC1: f(float x, <#float y#>) |
Douglas Gregor | b657f11 | 2009-09-22 21:11:38 +0000 | [diff] [blame] | 24 | // RUN: clang-cc -fsyntax-only -code-completion-at=%s:19:13 %s -o - | FileCheck -check-prefix=CC2 %s && |
Douglas Gregor | 86d802e | 2009-09-23 00:34:09 +0000 | [diff] [blame^] | 25 | // FIXME: two extra overloads are showing up! |
| 26 | // CHECK-CC2: f(int i, int j, <#int k#>) |
Douglas Gregor | b657f11 | 2009-09-22 21:11:38 +0000 | [diff] [blame] | 27 | // RUN: true |
| 28 | } |