Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Commit

Permalink
Format with predefined_style when a style cannot be obtained
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmartin authored and jacobdufault committed Jan 3, 2018
1 parent abf3106 commit ee01f8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clang_format.cc
Expand Up @@ -44,7 +44,7 @@ std::vector<tooling::Replacement> ClangFormatDocument(
}

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)),
working_file->filename);
return std::vector<tooling::Replacement>(format_result.begin(),
Expand Down

0 comments on commit ee01f8c

Please sign in to comment.