njames93 added a comment. 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.
================ 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); + }); ---------------- Nit: just use a for loop over a lambda. ================ Comment at: clang/lib/Format/Format.cpp:3051 + // It was already correctly parsed. + assert(!Ec); + } ---------------- Nit: Add a void cast to silence unused warnings in release builds. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93844/new/ https://reviews.llvm.org/D93844 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits