[PATCH] D72326: [clang-format] Rebased on master: Add option to specify explicit config file
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 7 07:34:42 PDT 2020
MyDeveloperDay added inline comments.
================
Comment at: clang/lib/Format/Format.cpp:2700
+ if (std::error_code EC = Text.getError())
+ return make_string_error(EC.message());
+ std::error_code ParserErrorCode =
----------------
if you return here IsSuitable will be true..
================
Comment at: clang/lib/Format/Format.cpp:2707
+ } else if (ParserErrorCode != ParseError::Success) {
+ return make_string_error("Error reading " + ConfigFile + ": " +
+ ParserErrorCode.message());
----------------
again here you need to set IsSutable to false
================
Comment at: clang/lib/Format/Format.cpp:2709
+ ParserErrorCode.message());
+ }
+ return Style;
----------------
maybe its better just to set this to true here *IsSuitable = true; and set it to false on line @2695
================
Comment at: clang/lib/Format/Format.cpp:2792
+ } else {
+ return *ConfigStyle;
}
----------------
this could then mean you return with something wrong here..
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72326/new/
https://reviews.llvm.org/D72326
More information about the cfe-commits
mailing list