blob: fe8851a6a226719406529427fb6588c6d0655f25 [file] [log] [blame]
Argyrios Kyrtzidis9cbe8862009-07-14 05:34:59 +00001class Cls {
2public:
3 Cls operator +(const Cls &RHS);
4};
5
6static void bar() {
7 Cls x1, x2, x3;
8 Cls x4 = x1 + x2 + x3;
9}
10
11Cls 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 Kyrtzidisd49e8dd2009-07-14 03:19:46 +000018
19// Yep, we can show references of '+' plus signs that are overloaded, w00t!
Argyrios Kyrtzidis9cbe8862009-07-14 05:34:59 +000020// 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,'