[PATCH] D123535: [clang-format] Allow empty .clang-format file
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 11 12:08:04 PDT 2022
owenpan created this revision.
owenpan added reviewers: curdeius, HazardyKnusperkeks, MyDeveloperDay.
owenpan added a project: clang-format.
Herald added a project: All.
owenpan requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D123535
Files:
clang/lib/Format/Format.cpp
Index: clang/lib/Format/Format.cpp
===================================================================
--- clang/lib/Format/Format.cpp
+++ clang/lib/Format/Format.cpp
@@ -1722,7 +1722,7 @@
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,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123535.421996.patch
Type: text/x-patch
Size: 561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220411/61524357/attachment.bin>
More information about the cfe-commits
mailing list