[cfe-commits] r90416 - in /cfe/trunk: test/Misc/remap-file.c tools/CIndex/CIndex.cpp
Daniel Dunbar
daniel at zuster.org
Wed Dec 2 21:32:40 PST 2009
Author: ddunbar
Date: Wed Dec 2 23:32:40 2009
New Revision: 90416
URL: http://llvm.org/viewvc/llvm-project?rev=90416&view=rev
Log:
Update test and CIndex to use -FOO BAR form for -{remap-file,code-completion-at}.
Modified:
cfe/trunk/test/Misc/remap-file.c
cfe/trunk/tools/CIndex/CIndex.cpp
Modified: cfe/trunk/test/Misc/remap-file.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/remap-file.c?rev=90416&r1=90415&r2=90416&view=diff
==============================================================================
--- cfe/trunk/test/Misc/remap-file.c (original)
+++ cfe/trunk/test/Misc/remap-file.c Wed Dec 2 23:32:40 2009
@@ -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
Modified: cfe/trunk/tools/CIndex/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndex.cpp?rev=90416&r1=90415&r2=90416&view=diff
==============================================================================
--- cfe/trunk/tools/CIndex/CIndex.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndex.cpp Wed Dec 2 23:32:40 2009
@@ -1211,13 +1211,14 @@
// 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 @@
}
// 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);
}
More information about the cfe-commits
mailing list