Author: owenca Date: 2022-04-12T13:40:52-07:00 New Revision: 3398bfb67726cbd6ebb80ab41b437cdb5a7b35cb
URL: https://github.com/llvm/llvm-project/commit/3398bfb67726cbd6ebb80ab41b437cdb5a7b35cb DIFF: https://github.com/llvm/llvm-project/commit/3398bfb67726cbd6ebb80ab41b437cdb5a7b35cb.diff LOG: [clang-format] Allow empty .clang-format file Differential Revision: https://reviews.llvm.org/D123535 Added: Modified: clang/lib/Format/Format.cpp Removed: ################################################################################ diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 0bbd54353d7b8..bce66d117dbd1 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -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, _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits