mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-26 03:15:19 +00:00
[clangd] Strip file:// from the URI when calling formatting.
It confuses FileManager on windows. llvm-svn: 294314
This commit is contained in:
parent
32f0a4330a
commit
f86708dbf5
@ -63,6 +63,9 @@ static std::string formatCode(StringRef Code, StringRef Filename,
|
||||
// Call clang-format.
|
||||
// FIXME: Don't ignore style.
|
||||
format::FormatStyle Style = format::getLLVMStyle();
|
||||
// On windows FileManager doesn't like file://. Just strip it, clang-format
|
||||
// doesn't need it.
|
||||
Filename.consume_front("file://");
|
||||
tooling::Replacements Replacements =
|
||||
format::reformat(Style, Code, Ranges, Filename);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user