Argyrios Kyrtzidis | 9cbe886 | 2009-07-14 05:34:59 +0000 | [diff] [blame^] | 1 | class Cls { |
| 2 | public: |
| 3 | Cls operator +(const Cls &RHS); |
| 4 | }; |
| 5 | |
| 6 | static void bar() { |
| 7 | Cls x1, x2, x3; |
| 8 | Cls x4 = x1 + x2 + x3; |
| 9 | } |
| 10 | |
| 11 | Cls Cls::operator +(const Cls &RHS) { |
| 12 | } |
| 13 | |
| 14 | // RUN: clang-cc -emit-pch %s -o %t.ast && |
| 15 | // RUN: index-test %t.ast -point-at %s:8:17 -print-decls | count 2 && |
| 16 | // RUN: index-test %t.ast -point-at %s:8:17 -print-decls | grep ':3:9,' && |
| 17 | // RUN: index-test %t.ast -point-at %s:8:17 -print-decls | grep ':11:10,' && |
Argyrios Kyrtzidis | d49e8dd | 2009-07-14 03:19:46 +0000 | [diff] [blame] | 18 | |
| 19 | // Yep, we can show references of '+' plus signs that are overloaded, w00t! |
Argyrios Kyrtzidis | 9cbe886 | 2009-07-14 05:34:59 +0000 | [diff] [blame^] | 20 | // RUN: index-test %t.ast -point-at %s:3:15 -print-refs | count 2 && |
| 21 | // RUN: index-test %t.ast -point-at %s:3:15 -print-refs | grep ':8:17,' && |
| 22 | // RUN: index-test %t.ast -point-at %s:3:15 -print-refs | grep ':8:22,' |