sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land.
================ Comment at: clang-tools-extra/clangd/ClangdServer.h:138 + std::function<bool(const Tweak &)> TweakFilter = [](const Tweak &T) { + return true; // always enabled all tweaks. + }; ---------------- the default value should reject hidden checks, for API users. The duplication is a bit sad ================ Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:535 + Opts.TweakFilter = [&](const Tweak &T) { + // Enable non-hidden tweaks and hidden tweaks if -hiden-features flag is on. + bool DefaultEnable = !T.hidden() || HiddenFeatures; ---------------- nit: -hidden-features ================ Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:536 + // Enable non-hidden tweaks and hidden tweaks if -hiden-features flag is on. + bool DefaultEnable = !T.hidden() || HiddenFeatures; + if (TweakList.getNumOccurrences()) ---------------- nit: seems clearer to write: ``` if (hidden && !HiddenFeatures) return false; if (flag passed && !name matches flag) return false; return true ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64565/new/ https://reviews.llvm.org/D64565 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits