Revert "[clang-format] Allow empty .clang-format file"
authorowenca <owenpiano@gmail.com>
Tue, 12 Apr 2022 21:28:02 +0000 (14:28 -0700)
committerowenca <owenpiano@gmail.com>
Tue, 12 Apr 2022 21:28:02 +0000 (14:28 -0700)
This reverts commit 6eafda0ef0543cad4b190002e9dae93b036a4ded.

clang/lib/Format/Format.cpp

index bce66d1..0bbd543 100644 (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::Success);
+    return make_error_code(ParseError::Error);
   Style->StyleSet.Clear();
   std::vector<FormatStyle> Styles;
   llvm::yaml::Input Input(Config, /*Ctxt=*/nullptr, DiagHandler,