[mlir][dataflow] Allow re-run all analyses in DataFlowSolver (#120881)
[llvm-project.git] / clang / test / Index / cxx-operator-overload.cpp
blob864744859332d5449157af8c165aafbe9aacf581
1 // Run lines are sensitive to line numbers and come below the code.
2 // FIXME: re-enable this when we can serialize more C++ ASTs
3 class Cls {
4 public:
5 Cls operator +(const Cls &RHS);
6 };
8 static void bar() {
9 Cls x1, x2, x3;
10 Cls x4 = x1 + x2 + x3;
13 Cls Cls::operator +(const Cls &RHS) { while (1) {} }
15 // RUN: %clang_cc1 -emit-pch %s -o %t.ast
17 // RUNx: index-test %t.ast -point-at %s:10:17 -print-decls > %t &&
18 // RUNx: cat %t | count 2 &&
19 // RUNx: grep ':5:9,' %t &&
20 // RUNx: grep ':13:10,' %t &&
22 // Yep, we can show references of '+' plus signs that are overloaded, w00t!
23 // RUNx: index-test %t.ast -point-at %s:5:15 -print-refs > %t &&
24 // RUNx: cat %t | count 2 &&
25 // RUNx: grep ':10:17,' %t &&
26 // RUNx: grep ':10:22,' %t &&
28 // RUNx: index-test %t.ast -point-at %s:10:14 | grep 'DeclRefExpr x1'