aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-12-03 05:32:40 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-12-03 05:32:40 +0000
commit7bd716557bf27361408457d059f16f1596f22a1b (patch)
tree018046a0201f33754c716362bef2db3056eaea05
parente14b5f5237d0740c2b21c50b2eb41a06e778d820 (diff)
Update test and CIndex to use -FOO BAR form for -{remap-file,code-completion-at}.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90416 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Misc/remap-file.c6
-rw-r--r--tools/CIndex/CIndex.cpp8
2 files changed, 8 insertions, 6 deletions
diff --git a/test/Misc/remap-file.c b/test/Misc/remap-file.c
index da10590ccd..f12fe95012 100644
--- a/test/Misc/remap-file.c
+++ b/test/Misc/remap-file.c
@@ -1,6 +1,6 @@
-// RUN: clang-cc -remap-file="%s;%S/Inputs/remapped-file" -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-EXIST %s
-// RUN: clang-cc -remap-file="%S/nonexistent.c;%S/Inputs/remapped-file" -fsyntax-only %S/nonexistent.c 2>&1 | FileCheck -check-prefix=CHECK-NONEXIST %s
-// RUN: clang-cc -remap-file="%S/nonexistent.c;%S/Inputs/remapped-file-2" -remap-file="%S/nonexistent.h;%S/Inputs/remapped-file-3" -fsyntax-only %S/nonexistent.c 2>&1 | FileCheck -check-prefix=CHECK-HEADER %s
+// RUN: clang-cc -remap-file "%s;%S/Inputs/remapped-file" -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-EXIST %s
+// RUN: clang-cc -remap-file "%S/nonexistent.c;%S/Inputs/remapped-file" -fsyntax-only %S/nonexistent.c 2>&1 | FileCheck -check-prefix=CHECK-NONEXIST %s
+// RUN: clang-cc -remap-file "%S/nonexistent.c;%S/Inputs/remapped-file-2" -remap-file "%S/nonexistent.h;%S/Inputs/remapped-file-3" -fsyntax-only %S/nonexistent.c 2>&1 | FileCheck -check-prefix=CHECK-HEADER %s
// CHECK-EXIST: remap-file.c:1:28: warning: incompatible pointer types
// CHECK-NONEXIST: nonexistent.c:1:28: warning: incompatible pointer types
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index 8ef9fb5ca0..432f4a09ee 100644
--- a/tools/CIndex/CIndex.cpp
+++ b/tools/CIndex/CIndex.cpp
@@ -1211,13 +1211,14 @@ void clang_codeComplete(CXIndex CIdx,
// Add the appropriate '-code-completion-at=file:line:column' argument
// to perform code completion, with an "-Xclang" preceding it.
std::string code_complete_at;
- code_complete_at += "-code-completion-at=";
code_complete_at += complete_filename;
code_complete_at += ":";
code_complete_at += llvm::utostr(complete_line);
code_complete_at += ":";
code_complete_at += llvm::utostr(complete_column);
argv.push_back("-Xclang");
+ argv.push_back("-code-completion-at");
+ argv.push_back("-Xclang");
argv.push_back(code_complete_at.c_str());
argv.push_back("-Xclang");
argv.push_back("-no-code-completion-debug-printer");
@@ -1242,11 +1243,12 @@ void clang_codeComplete(CXIndex CIdx,
}
// Remap the file.
- std::string RemapArg = "-remap-file=";
- RemapArg += unsaved_files[i].Filename;
+ std::string RemapArg = unsaved_files[i].Filename;
RemapArg += ';';
RemapArg += tmpFileName;
RemapArgs.push_back("-Xclang");
+ RemapArgs.push_back("-remap-file");
+ RemapArgs.push_back("-Xclang");
RemapArgs.push_back(RemapArg);
TemporaryFiles.push_back(SavedFile);
}