diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-07-14 03:18:25 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-07-14 03:18:25 +0000 |
commit | 558449bf7961e4aa9d589fbac579c6b0b792a9aa (patch) | |
tree | 19a328cad49f4e5ebccade27cc16f172f912a390 /clang/test/Index/resolve-loc.c | |
parent | 307b0717f728afdd151dc608b5c8b955969472c9 (diff) | |
download | bcm5719-llvm-558449bf7961e4aa9d589fbac579c6b0b792a9aa.tar.gz bcm5719-llvm-558449bf7961e4aa9d589fbac579c6b0b792a9aa.zip |
Move the test input source code to a separate file.
That way we can freely add new RUN lines without having to correct the line part in all the -point-at options.
llvm-svn: 75595
Diffstat (limited to 'clang/test/Index/resolve-loc.c')
-rw-r--r-- | clang/test/Index/resolve-loc.c | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/clang/test/Index/resolve-loc.c b/clang/test/Index/resolve-loc.c index d04b79b024e..1a6bf4a570d 100644 --- a/clang/test/Index/resolve-loc.c +++ b/clang/test/Index/resolve-loc.c @@ -1,24 +1,13 @@ -// RUN: clang-cc -emit-pch %s -o %t.ast && -// RUN: index-test %t.ast -point-at %s:15:8 | grep top_var && -// RUN: index-test %t.ast -point-at %s:17:15 | grep top_func_decl && -// RUN: index-test %t.ast -point-at %s:17:25 | grep param1 && -// RUN: index-test %t.ast -point-at %s:19:17 | grep top_func_def && -// RUN: index-test %t.ast -point-at %s:19:23 | grep param2 && -// RUN: index-test %t.ast -point-at %s:20:10 | grep local_var1 && -// RUN: index-test %t.ast -point-at %s:21:15 | grep for_var && -// RUN: index-test %t.ast -point-at %s:21:43 | grep top_func_def && -// RUN: index-test %t.ast -point-at %s:21:43 | grep '++for_var' && -// RUN: index-test %t.ast -point-at %s:22:9 | grep local_var2 && -// RUN: index-test %t.ast -point-at %s:22:30 | grep local_var2 && -// RUN: index-test %t.ast -point-at %s:22: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; - } -} +// 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' && |