llvm-project/clang/test/Index/cxx-operator-overload.cpp
Argyrios Kyrtzidis d49e8dd759 Add a C++ indexing test case, where we show the references of overloaded '+' plus signs.
Ok, this is a bit out of place since C++ support is way way off, but it was just too cool to not show it off :-)

llvm-svn: 75601
2009-07-14 03:19:46 +00:00

10 lines
782 B
C++

// RUN: clang-cc -emit-pch %S/cxx-operator-overload-input.cpp -o %t.ast &&
// RUN: index-test %t.ast -point-at %S/cxx-operator-overload-input.cpp:8:17 -print-decls | count 2 &&
// RUN: index-test %t.ast -point-at %S/cxx-operator-overload-input.cpp:8:17 -print-decls | grep ':3:9,' &&
// RUN: index-test %t.ast -point-at %S/cxx-operator-overload-input.cpp:8:17 -print-decls | grep ':11:10,' &&
// Yep, we can show references of '+' plus signs that are overloaded, w00t!
// RUN: index-test %t.ast -point-at %S/cxx-operator-overload-input.cpp:3:15 -print-refs | count 2 &&
// RUN: index-test %t.ast -point-at %S/cxx-operator-overload-input.cpp:3:15 -print-refs | grep ':8:17,' &&
// RUN: index-test %t.ast -point-at %S/cxx-operator-overload-input.cpp:3:15 -print-refs | grep ':8:22,'