summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/cxx-operator-overload.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-14 03:19:46 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-14 03:19:46 +0000
commitd49e8dd759859b05cde901e30d2160439c6d101f (patch)
tree73d1ce35be5f3f248fe9b6c135b9ce1971ad1165 /clang/test/Index/cxx-operator-overload.cpp
parentef1c1e572c002ed603653b2189f1ba1f2cd20fe2 (diff)
downloadbcm5719-llvm-d49e8dd759859b05cde901e30d2160439c6d101f.tar.gz
bcm5719-llvm-d49e8dd759859b05cde901e30d2160439c6d101f.zip
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
Diffstat (limited to 'clang/test/Index/cxx-operator-overload.cpp')
-rw-r--r--clang/test/Index/cxx-operator-overload.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Index/cxx-operator-overload.cpp b/clang/test/Index/cxx-operator-overload.cpp
new file mode 100644
index 00000000000..54d6896f324
--- /dev/null
+++ b/clang/test/Index/cxx-operator-overload.cpp
@@ -0,0 +1,9 @@
+// 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,'
OpenPOWER on IntegriCloud