[clang] c80eaa9 - Revert "[clang-format] Allow empty .clang-format file"

via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 12 14:28:42 PDT 2022


Author: owenca
Date: 2022-04-12T14:28:02-07:00
New Revision: c80eaa919f210014312f77c4c73f502406b4989d

URL: https://github.com/llvm/llvm-project/commit/c80eaa919f210014312f77c4c73f502406b4989d
DIFF: https://github.com/llvm/llvm-project/commit/c80eaa919f210014312f77c4c73f502406b4989d.diff

LOG: Revert "[clang-format] Allow empty .clang-format file"

This reverts commit 6eafda0ef0543cad4b190002e9dae93b036a4ded.

Added: 
    

Modified: 
    clang/lib/Format/Format.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index bce66d117dbd1..0bbd54353d7b8 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::Success);
+    return make_error_code(ParseError::Error);
   Style->StyleSet.Clear();
   std::vector<FormatStyle> Styles;
   llvm::yaml::Input Input(Config, /*Ctxt=*/nullptr, DiagHandler,


        


More information about the cfe-commits mailing list