forked from OSchip/llvm-project
Silence an "illegal conversion" diagnostic
MSVC was issuing "illegal conversion; more than one user-defined conversion has been implicitly applied" as a warning on this code. Explicitly calling .str() causes a StringRef to be materialized so that a second user-defined conversion is not required.
This commit is contained in:
parent
92fd2eb74f
commit
9878e17624
|
@ -48,7 +48,7 @@ llvm::Optional<std::string> queryXcrun(llvm::ArrayRef<llvm::StringRef> Argv) {
|
|||
llvm::sys::fs::createTemporaryFile("clangd-xcrun", "", OutFile);
|
||||
llvm::FileRemover OutRemover(OutFile);
|
||||
llvm::Optional<llvm::StringRef> Redirects[3] = {
|
||||
/*stdin=*/{""}, /*stdout=*/{OutFile}, /*stderr=*/{""}};
|
||||
/*stdin=*/{""}, /*stdout=*/{OutFile.str()}, /*stderr=*/{""}};
|
||||
vlog("Invoking {0} to find clang installation", *Xcrun);
|
||||
int Ret = llvm::sys::ExecuteAndWait(*Xcrun, Argv,
|
||||
/*Env=*/llvm::None, Redirects,
|
||||
|
|
Loading…
Reference in New Issue