[PATCH] D72326: [clang-format] Rebased on master: Add option to specify explicit config file
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 16 13:30:32 PST 2021
HazardyKnusperkeks added inline comments.
================
Comment at: clang/lib/Format/Format.cpp:3231
+ return Style;
+ } else if (ParserErrorCode != ParseError::Success) {
+ return make_string_error("Error reading " + ConfigFile + ": " +
----------------
else after return
But I prefer a `switch` on `ParseErrorCode`.
================
Comment at: clang/lib/Format/Format.cpp:3273
+ llvm::SmallVector<std::string, 2> FilesToLookFor;
+ // User provided clang-format file using -style=file:/path/to/format/file
----------------
Why move that, it it's not used here?
================
Comment at: clang/lib/Format/Format.cpp:2743
+ bool IsSuitable = true;
+ auto Style = LoadConfigFile(StyleNameFile, FS, &IsSuitable);
+ if (Style && !IsSuitable) {
----------------
MyDeveloperDay wrote:
> pass Style in and rename return value
Why did you not follow your own comment?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72326/new/
https://reviews.llvm.org/D72326
More information about the cfe-commits
mailing list