Author: owenca Date: 2022-04-12T13:54:12-07:00 New Revision: 6eafda0ef0543cad4b190002e9dae93b036a4ded
URL: https://github.com/llvm/llvm-project/commit/6eafda0ef0543cad4b190002e9dae93b036a4ded DIFF: https://github.com/llvm/llvm-project/commit/6eafda0ef0543cad4b190002e9dae93b036a4ded.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, _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits