[PATCH] D155392: [clangd] add a config knob to disable modules
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 19 06:35:06 PDT 2023
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/unittests/ModulesTests.cpp:34
+protected:
+ ModulesTest() : WithCfg(Config::Key, makeModuleConfig(GetParam())) {}
+};
----------------
testing behaviour indirectly through config options cause some troubles in the long term (e.g. when we want to change the default behaviour a bunch of tests observe a different behaviour all of a sudden, or when we want to override behaviour at different layers it's hard to compose as we can't overlay configs but only override them)
so can we have this as a `ParseInput::ParseOption` instead? as discussed we can set it in `ASTWorker`, without doing the extra IO.
(you've got more context as we discussed this offline, there's also a solution that provides tests with the ability to have a different default "test" config and flips bits on it, but that's a little bit more involved so no need to block this patch on it)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155392/new/
https://reviews.llvm.org/D155392
More information about the cfe-commits
mailing list