зеркало из https://github.com/microsoft/clang-1.git
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
This commit is contained in:
Родитель
e14b5f5237
Коммит
7bd716557b
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче