diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-12-05 20:13:27 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-12-05 20:13:27 +0000 |
| commit | 5899e8916bc49c8938e510ce092cb9d1e9a5228b (patch) | |
| tree | 40c907e1f6de01e50d6ac4fce65e2b7627d9719b | |
| parent | 79d55f5c1f9b268b57d481c022463105e04d3c9d (diff) | |
| download | bcm5719-llvm-5899e8916bc49c8938e510ce092cb9d1e9a5228b.tar.gz bcm5719-llvm-5899e8916bc49c8938e510ce092cb9d1e9a5228b.zip | |
[c-index-test] For the '-remap-file' option use a comma for separator which is more
Windows friendly than the colon.
llvm-svn: 196529
| -rw-r--r-- | clang/test/Index/Inputs/crash-recovery-code-complete-remap.c | 2 | ||||
| -rw-r--r-- | clang/test/Index/crash-recovery-code-complete.c | 2 | ||||
| -rw-r--r-- | clang/test/Index/crash-recovery-reparse.c | 2 | ||||
| -rw-r--r-- | clang/test/Index/preamble-reparse-cmd-define.c | 2 | ||||
| -rw-r--r-- | clang/test/Index/preamble-reparse.c | 2 | ||||
| -rw-r--r-- | clang/test/Index/remap-complete.c | 2 | ||||
| -rw-r--r-- | clang/test/Index/remap-cursor-at.c | 2 | ||||
| -rw-r--r-- | clang/test/Index/remap-load.c | 2 | ||||
| -rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 14 |
9 files changed, 15 insertions, 15 deletions
diff --git a/clang/test/Index/Inputs/crash-recovery-code-complete-remap.c b/clang/test/Index/Inputs/crash-recovery-code-complete-remap.c index f4564e1f608..fc63c9fd245 100644 --- a/clang/test/Index/Inputs/crash-recovery-code-complete-remap.c +++ b/clang/test/Index/Inputs/crash-recovery-code-complete-remap.c @@ -1,6 +1,6 @@ // RUN: echo env CINDEXTEST_EDITING=1 \ // RUN: not c-index-test -test-load-source-reparse 1 local \ -// RUN: -remap-file="%s:%S/Inputs/crash-recovery-code-complete-remap.c" \ +// RUN: -remap-file="%s,%S/Inputs/crash-recovery-code-complete-remap.c" \ // RUN: %s 2> %t.err // RUN: FileCheck < %t.err -check-prefix=CHECK-CODE-COMPLETE-CRASH %s // CHECK-CODE-COMPLETE-CRASH: Unable to reparse translation unit diff --git a/clang/test/Index/crash-recovery-code-complete.c b/clang/test/Index/crash-recovery-code-complete.c index 55552acc93c..0adf20ffeed 100644 --- a/clang/test/Index/crash-recovery-code-complete.c +++ b/clang/test/Index/crash-recovery-code-complete.c @@ -1,6 +1,6 @@ // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_PREAMBLE_FILE=%t-preamble.pch \ // RUN: not c-index-test -code-completion-at=%s:20:1 \ -// RUN: "-remap-file=%s:%S/Inputs/crash-recovery-code-complete-remap.c" \ +// RUN: "-remap-file=%s,%S/Inputs/crash-recovery-code-complete-remap.c" \ // RUN: %s 2> %t.err // RUN: FileCheck < %t.err -check-prefix=CHECK-CODE-COMPLETE-CRASH %s // RUN: test ! -e %t-preamble.pch diff --git a/clang/test/Index/crash-recovery-reparse.c b/clang/test/Index/crash-recovery-reparse.c index 4aeef580617..baa6604b535 100644 --- a/clang/test/Index/crash-recovery-reparse.c +++ b/clang/test/Index/crash-recovery-reparse.c @@ -1,6 +1,6 @@ // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_PREAMBLE_FILE=%t-preamble.pch \ // RUN: not c-index-test -test-load-source-reparse 1 local \ -// RUN: -remap-file="%s:%S/Inputs/crash-recovery-reparse-remap.c" \ +// RUN: -remap-file="%s,%S/Inputs/crash-recovery-reparse-remap.c" \ // RUN: %s 2> %t.err // RUN: FileCheck < %t.err -check-prefix=CHECK-REPARSE-SOURCE-CRASH %s // RUN: test ! -e $t-preamble.pch diff --git a/clang/test/Index/preamble-reparse-cmd-define.c b/clang/test/Index/preamble-reparse-cmd-define.c index ca8adcb8753..3fa76836d61 100644 --- a/clang/test/Index/preamble-reparse-cmd-define.c +++ b/clang/test/Index/preamble-reparse-cmd-define.c @@ -1,6 +1,6 @@ // RUN: c-index-test -write-pch %t.h.pch %s.h // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_REMAP_AFTER_TRIAL=1 c-index-test -test-load-source-reparse 3 local \ -// RUN: "-remap-file=%s:%s.remap" %s -include %t.h -D CMD_MACRO=1 2>&1 | FileCheck %s +// RUN: "-remap-file=%s,%s.remap" %s -include %t.h -D CMD_MACRO=1 2>&1 | FileCheck %s // CHECK-NOT: error: diff --git a/clang/test/Index/preamble-reparse.c b/clang/test/Index/preamble-reparse.c index d56d5402cb7..a7c87806d50 100644 --- a/clang/test/Index/preamble-reparse.c +++ b/clang/test/Index/preamble-reparse.c @@ -1,2 +1,2 @@ -// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 local "-remap-file=%S/Inputs/preamble-reparse-1.c:%S/Inputs/preamble-reparse-2.c" %S/Inputs/preamble-reparse-1.c | FileCheck %s +// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 local "-remap-file=%S/Inputs/preamble-reparse-1.c,%S/Inputs/preamble-reparse-2.c" %S/Inputs/preamble-reparse-1.c | FileCheck %s // CHECK: preamble-reparse-1.c:1:5: VarDecl=x:1:5 Extent=[1:1 - 1:6] diff --git a/clang/test/Index/remap-complete.c b/clang/test/Index/remap-complete.c index 95551b997a4..ffc467f4a7b 100644 --- a/clang/test/Index/remap-complete.c +++ b/clang/test/Index/remap-complete.c @@ -1,4 +1,4 @@ -// RUN: c-index-test -code-completion-at=%s:6:2 -remap-file="%s:%S/Inputs/remap-complete-to.c" %s | FileCheck %s +// RUN: c-index-test -code-completion-at=%s:6:2 -remap-file="%s,%S/Inputs/remap-complete-to.c" %s | FileCheck %s // CHECK: FunctionDecl:{ResultType int}{TypedText f0}{LeftParen (} void f() { } diff --git a/clang/test/Index/remap-cursor-at.c b/clang/test/Index/remap-cursor-at.c index 7e390d21542..782b6bbad7f 100644 --- a/clang/test/Index/remap-cursor-at.c +++ b/clang/test/Index/remap-cursor-at.c @@ -1,4 +1,4 @@ -// RUN: c-index-test -cursor-at=%s:1:15 -cursor-at=%s:2:21 -remap-file="%s:%S/Inputs/remap-load-to.c" %s | FileCheck %s +// RUN: c-index-test -cursor-at=%s:1:15 -cursor-at=%s:2:21 -remap-file="%s,%S/Inputs/remap-load-to.c" %s | FileCheck %s // CHECK: ParmDecl=parm1:1:13 (Definition) // CHECK: DeclRefExpr=parm2:1:26 diff --git a/clang/test/Index/remap-load.c b/clang/test/Index/remap-load.c index 973a9477c93..f433fa7eac7 100644 --- a/clang/test/Index/remap-load.c +++ b/clang/test/Index/remap-load.c @@ -1,4 +1,4 @@ -// RUN: c-index-test -test-load-source all -remap-file="%s:%S/Inputs/remap-load-to.c" %s | FileCheck -check-prefix=CHECK %s +// RUN: c-index-test -test-load-source all -remap-file="%s,%S/Inputs/remap-load-to.c" %s | FileCheck -check-prefix=CHECK %s // CHECK: remap-load.c:1:5: FunctionDecl=foo:1:5 (Definition) Extent=[1:1 - 3:2] // CHECK: remap-load.c:1:13: ParmDecl=parm1:1:13 (Definition) Extent=[1:9 - 1:18] diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index 40794308065..39cdcc149ee 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -142,10 +142,10 @@ static int parse_remapped_files_with_opt(const char *opt_name, char *filename; char *contents; FILE *to_file; - const char *colon = strchr(arg_string, ':'); - if (!colon) { + const char *sep = strchr(arg_string, ','); + if (!sep) { fprintf(stderr, - "error: %sfrom:to argument is missing semicolon\n", opt_name); + "error: %sfrom:to argument is missing comma\n", opt_name); free_remapped_files(*unsaved_files, i); *unsaved_files = 0; *num_unsaved_files = 0; @@ -153,10 +153,10 @@ static int parse_remapped_files_with_opt(const char *opt_name, } /* Open the file that we're remapping to. */ - to_file = fopen(colon + 1, "rb"); + to_file = fopen(sep + 1, "rb"); if (!to_file) { fprintf(stderr, "error: cannot open file %s that we are remapping to\n", - colon + 1); + sep + 1); free_remapped_files(*unsaved_files, i); *unsaved_files = 0; *num_unsaved_files = 0; @@ -172,7 +172,7 @@ static int parse_remapped_files_with_opt(const char *opt_name, contents = (char *)malloc(unsaved->Length + 1); if (fread(contents, 1, unsaved->Length, to_file) != unsaved->Length) { fprintf(stderr, "error: unexpected %s reading 'to' file %s\n", - (feof(to_file) ? "EOF" : "error"), colon + 1); + (feof(to_file) ? "EOF" : "error"), sep + 1); fclose(to_file); free_remapped_files(*unsaved_files, i); free(contents); @@ -187,7 +187,7 @@ static int parse_remapped_files_with_opt(const char *opt_name, fclose(to_file); /* Copy the file name that we're remapping from. */ - filename_len = colon - arg_string; + filename_len = sep - arg_string; filename = (char *)malloc(filename_len + 1); memcpy(filename, arg_string, filename_len); filename[filename_len] = 0; |

