2009-07-16 02:59:40 +08:00
|
|
|
// Run lines are sensitive to line numbers and come below the code.
|
2009-09-10 07:08:42 +08:00
|
|
|
// FIXME: re-enable this when we can serialize more C++ ASTs
|
2009-07-14 13:34:59 +08:00
|
|
|
class Cls {
|
|
|
|
public:
|
|
|
|
Cls operator +(const Cls &RHS);
|
|
|
|
};
|
|
|
|
|
|
|
|
static void bar() {
|
|
|
|
Cls x1, x2, x3;
|
|
|
|
Cls x4 = x1 + x2 + x3;
|
|
|
|
}
|
|
|
|
|
2009-07-22 05:06:08 +08:00
|
|
|
Cls Cls::operator +(const Cls &RHS) { while (1) {} }
|
2009-07-14 13:34:59 +08:00
|
|
|
|
2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -emit-pch %s -o %t.ast
|
2009-07-21 08:06:46 +08:00
|
|
|
|
2009-09-10 07:08:42 +08:00
|
|
|
// RUNx: index-test %t.ast -point-at %s:10:17 -print-decls > %t &&
|
|
|
|
// RUNx: cat %t | count 2 &&
|
|
|
|
// RUNx: grep ':5:9,' %t &&
|
|
|
|
// RUNx: grep ':13:10,' %t &&
|
2009-07-14 11:19:46 +08:00
|
|
|
|
|
|
|
// Yep, we can show references of '+' plus signs that are overloaded, w00t!
|
2009-09-10 07:08:42 +08:00
|
|
|
// RUNx: index-test %t.ast -point-at %s:5:15 -print-refs > %t &&
|
|
|
|
// RUNx: cat %t | count 2 &&
|
|
|
|
// RUNx: grep ':10:17,' %t &&
|
|
|
|
// RUNx: grep ':10:22,' %t &&
|
2009-08-01 03:02:11 +08:00
|
|
|
|
2009-09-10 07:08:42 +08:00
|
|
|
// RUNx: index-test %t.ast -point-at %s:10:14 | grep 'DeclRefExpr x1'
|