1 // Run lines are sensitive to line numbers and come below the code. 2 3 class Cls { 4 public: 5 Cls operator +(const Cls &RHS); 6 }; 7 8 static void bar() { 9 Cls x1, x2, x3; 10 Cls x4 = x1 + x2 + x3; 11 } 12 13 Cls Cls::operator +(const Cls &RHS) { while (1) {} } 14 15 // RUN: clang-cc -emit-pch %s -o %t.ast && 16 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 && 21 22 // Yep, we can show references of '+' plus signs that are overloaded, w00t! 23 // 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 && 27 28 // RUN: index-test %t.ast -point-at %s:10:14 | grep 'DeclRefExpr x1' 29