summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-14 05:34:59 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-14 05:34:59 +0000
commit9cbe886cff66f9ba28b039b8470c02739f7e19aa (patch)
tree34d1a532a6231202b4339ecadf9e3571c8210f96 /clang/test
parentf34815b32fac3cb8f951f566e2e83ad4728684f3 (diff)
downloadbcm5719-llvm-9cbe886cff66f9ba28b039b8470c02739f7e19aa.tar.gz
bcm5719-llvm-9cbe886cff66f9ba28b039b8470c02739f7e19aa.zip
Move the RUN lines on the same file but below the code, as suggested by Sebastian.
llvm-svn: 75608
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Index/cxx-operator-overload-input.cpp12
-rw-r--r--clang/test/Index/cxx-operator-overload.cpp27
-rw-r--r--clang/test/Index/resolve-loc-input.c14
-rw-r--r--clang/test/Index/resolve-loc.c44
4 files changed, 50 insertions, 47 deletions
diff --git a/clang/test/Index/cxx-operator-overload-input.cpp b/clang/test/Index/cxx-operator-overload-input.cpp
deleted file mode 100644
index f0503ae68b1..00000000000
--- a/clang/test/Index/cxx-operator-overload-input.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-class Cls {
-public:
- Cls operator +(const Cls &RHS);
-};
-
-static void bar() {
- Cls x1, x2, x3;
- Cls x4 = x1 + x2 + x3;
-}
-
-Cls Cls::operator +(const Cls &RHS) {
-}
diff --git a/clang/test/Index/cxx-operator-overload.cpp b/clang/test/Index/cxx-operator-overload.cpp
index 54d6896f324..fe8851a6a22 100644
--- a/clang/test/Index/cxx-operator-overload.cpp
+++ b/clang/test/Index/cxx-operator-overload.cpp
@@ -1,9 +1,22 @@
-// 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,' &&
+class Cls {
+public:
+ Cls operator +(const Cls &RHS);
+};
+
+static void bar() {
+ Cls x1, x2, x3;
+ Cls x4 = x1 + x2 + x3;
+}
+
+Cls Cls::operator +(const Cls &RHS) {
+}
+
+// RUN: clang-cc -emit-pch %s -o %t.ast &&
+// RUN: index-test %t.ast -point-at %s:8:17 -print-decls | count 2 &&
+// RUN: index-test %t.ast -point-at %s:8:17 -print-decls | grep ':3:9,' &&
+// RUN: index-test %t.ast -point-at %s: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,'
+// RUN: index-test %t.ast -point-at %s:3:15 -print-refs | count 2 &&
+// RUN: index-test %t.ast -point-at %s:3:15 -print-refs | grep ':8:17,' &&
+// RUN: index-test %t.ast -point-at %s:3:15 -print-refs | grep ':8:22,'
diff --git a/clang/test/Index/resolve-loc-input.c b/clang/test/Index/resolve-loc-input.c
deleted file mode 100644
index a36ae672691..00000000000
--- a/clang/test/Index/resolve-loc-input.c
+++ /dev/null
@@ -1,14 +0,0 @@
-int top_var;
-
-void top_func_decl(int param1);
-
-void top_func_def(int param2) {
- int local_var1;
- for (int for_var = 100; for_var < 500; ++for_var) {
- int local_var2 = for_var + 1;
- }
-}
-
-struct S {
- int field_var;
-};
diff --git a/clang/test/Index/resolve-loc.c b/clang/test/Index/resolve-loc.c
index 7fd3ad5957d..fc969e997b2 100644
--- a/clang/test/Index/resolve-loc.c
+++ b/clang/test/Index/resolve-loc.c
@@ -1,16 +1,32 @@
-// RUN: clang-cc -emit-pch %S/resolve-loc-input.c -o %t.ast &&
-// RUN: index-test %t.ast -point-at %S/resolve-loc-input.c:1:8 | grep top_var &&
-// RUN: index-test %t.ast -point-at %S/resolve-loc-input.c:3:15 | grep top_func_decl &&
-// RUN: index-test %t.ast -point-at %S/resolve-loc-input.c:3:25 | grep param1 &&
-// RUN: index-test %t.ast -point-at %S/resolve-loc-input.c:5:17 | grep top_func_def &&
-// RUN: index-test %t.ast -point-at %S/resolve-loc-input.c:5:23 | grep param2 &&
-// RUN: index-test %t.ast -point-at %S/resolve-loc-input.c:6:10 | grep local_var1 &&
-// RUN: index-test %t.ast -point-at %S/resolve-loc-input.c:7:15 | grep for_var &&
-// RUN: index-test %t.ast -point-at %S/resolve-loc-input.c:7:43 | grep top_func_def &&
-// RUN: index-test %t.ast -point-at %S/resolve-loc-input.c:7:43 | grep '++for_var' &&
-// RUN: index-test %t.ast -point-at %S/resolve-loc-input.c:8:9 | grep local_var2 &&
-// RUN: index-test %t.ast -point-at %S/resolve-loc-input.c:8:30 | grep local_var2 &&
-// RUN: index-test %t.ast -point-at %S/resolve-loc-input.c:8:30 | grep 'for_var + 1' &&
+int top_var;
+
+void top_func_decl(int param1);
+
+void top_func_def(int param2) {
+ int local_var1;
+ for (int for_var = 100; for_var < 500; ++for_var) {
+ int local_var2 = for_var + 1;
+ }
+}
+
+struct S {
+ int field_var;
+};
+
+
+// RUN: clang-cc -emit-pch %s -o %t.ast &&
+// RUN: index-test %t.ast -point-at %s:1:8 | grep top_var &&
+// RUN: index-test %t.ast -point-at %s:3:15 | grep top_func_decl &&
+// RUN: index-test %t.ast -point-at %s:3:25 | grep param1 &&
+// RUN: index-test %t.ast -point-at %s:5:17 | grep top_func_def &&
+// RUN: index-test %t.ast -point-at %s:5:23 | grep param2 &&
+// RUN: index-test %t.ast -point-at %s:6:10 | grep local_var1 &&
+// RUN: index-test %t.ast -point-at %s:7:15 | grep for_var &&
+// RUN: index-test %t.ast -point-at %s:7:43 | grep top_func_def &&
+// RUN: index-test %t.ast -point-at %s:7:43 | grep '++for_var' &&
+// RUN: index-test %t.ast -point-at %s:8:9 | grep local_var2 &&
+// RUN: index-test %t.ast -point-at %s:8:30 | grep local_var2 &&
+// RUN: index-test %t.ast -point-at %s:8:30 | grep 'for_var + 1' &&
// fields test.
-// RUN: index-test %t.ast -point-at %S/resolve-loc-input.c:13:10 | grep field_var
+// RUN: index-test %t.ast -point-at %s:13:10 | grep field_var
OpenPOWER on IntegriCloud