mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-26 01:21:57 +00:00
Format with predefined_style when a style cannot be obtained
This commit is contained in:
parent
5f8e1935a6
commit
7e2c19d792
@ -44,7 +44,7 @@ std::vector<tooling::Replacement> ClangFormatDocument(
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto format_result = reformat(
|
auto format_result = reformat(
|
||||||
*style, working_file->buffer_content,
|
style ? *style : predefined_style, working_file->buffer_content,
|
||||||
llvm::ArrayRef<tooling::Range>(tooling::Range(start, end - start)),
|
llvm::ArrayRef<tooling::Range>(tooling::Range(start, end - start)),
|
||||||
working_file->filename);
|
working_file->filename);
|
||||||
return std::vector<tooling::Replacement>(format_result.begin(),
|
return std::vector<tooling::Replacement>(format_result.begin(),
|
||||||
|
Loading…
Reference in New Issue
Block a user