[PATCH] D93844: [clang-format] Add possibility to be based on parent directory
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 2 12:40:44 PST 2021
HazardyKnusperkeks marked 2 inline comments as done.
HazardyKnusperkeks added a comment.
In D93844#2536354 <https://reviews.llvm.org/D93844#2536354>, @njames93 wrote:
> As a follow up it may be wise to pass a diag handler to parseConfiguration as when we parse it a second time, we probably want to disregard any warnings (like unknown key) detected as they will have been printed on the first pass.
Will try to look into it.
================
Comment at: clang/lib/Format/Format.cpp:3011-3017
+ std::for_each(
+ ChildFormatTextToApply.rbegin(), ChildFormatTextToApply.rend(),
+ [&Style, AllowUnknownOptions](const auto &Ptr) {
+ auto Ec = parseConfiguration(*Ptr, &Style, AllowUnknownOptions);
+ // It was already correctly parsed.
+ assert(!Ec);
+ });
----------------
njames93 wrote:
> Nit: just use a for loop over a lambda.
Did not know about `llvm::reverse`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93844/new/
https://reviews.llvm.org/D93844
More information about the cfe-commits
mailing list