blob: 935f661cce9643daddb3000ba450c9e74041d07a [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
13Cls Cls::operator +(const Cls &RHS) {
14}
15
16// RUN: clang-cc -emit-pch %s -o %t.ast &&
Argyrios Kyrtzidised53cae2009-07-15 18:59:40 +000017// RUN: index-test %t.ast -point-at %s:10:17 -print-decls | count 2 &&
18// RUN: index-test %t.ast -point-at %s:10:17 -print-decls | grep ':5:9,' &&
19// RUN: index-test %t.ast -point-at %s:10:17 -print-decls | grep ':13:10,' &&
Argyrios Kyrtzidisd49e8dd2009-07-14 03:19:46 +000020
21// Yep, we can show references of '+' plus signs that are overloaded, w00t!
Argyrios Kyrtzidised53cae2009-07-15 18:59:40 +000022// RUN: index-test %t.ast -point-at %s:5:15 -print-refs | count 2 &&
23// RUN: index-test %t.ast -point-at %s:5:15 -print-refs | grep ':10:17,' &&
24// RUN: index-test %t.ast -point-at %s:5:15 -print-refs | grep ':10:22,'