blob: 8f12f1661ffc4f31d3e52281389a408febcb7449 [file] [log] [blame]
Argyrios Kyrtzidised53cae2009-07-15 18:59:40 +00001// Run lines are sensitive to line numbers and come below the code.
2
Argyrios Kyrtzidis9cbe8862009-07-14 05:34:59 +00003class Cls {
4public:
5 Cls operator +(const Cls &RHS);
6};
7
8static void bar() {
9 Cls x1, x2, x3;
10 Cls x4 = x1 + x2 + x3;
11}
12
Mike Stumpe303c9e2009-07-21 21:06:08 +000013Cls Cls::operator +(const Cls &RHS) { while (1) {} }
Argyrios Kyrtzidis9cbe8862009-07-14 05:34:59 +000014
15// RUN: clang-cc -emit-pch %s -o %t.ast &&
Argyrios Kyrtzidis851b2082009-07-21 00:06:46 +000016
17// RUN: index-test %t.ast -point-at %s:10:17 -print-decls > %t &&
18// RUN: cat %t | count 2 &&
19// RUN: grep ':5:9,' %t &&
20// RUN: grep ':13:10,' %t &&
Argyrios Kyrtzidisd49e8dd2009-07-14 03:19:46 +000021
22// Yep, we can show references of '+' plus signs that are overloaded, w00t!
Argyrios Kyrtzidis851b2082009-07-21 00:06:46 +000023// RUN: index-test %t.ast -point-at %s:5:15 -print-refs > %t &&
24// RUN: cat %t | count 2 &&
25// RUN: grep ':10:17,' %t &&
26// RUN: grep ':10:22,' %t