[clang-format] Allow empty .clang-format file

Differential Revision: https://reviews.llvm.org/D123535
This commit is contained in:
owenca 2022-04-11 12:00:03 -07:00
parent 3754f60112
commit 6eafda0ef0
1 changed files with 1 additions and 1 deletions

View File

@ -1722,7 +1722,7 @@ std::error_code parseConfiguration(llvm::MemoryBufferRef Config,
FormatStyle::LanguageKind Language = Style->Language;
assert(Language != FormatStyle::LK_None);
if (Config.getBuffer().trim().empty())
return make_error_code(ParseError::Error);
return make_error_code(ParseError::Success);
Style->StyleSet.Clear();
std::vector<FormatStyle> Styles;
llvm::yaml::Input Input(Config, /*Ctxt=*/nullptr, DiagHandler,