[PATCH] D89936: [clang-tidy] adding "--clang-tidy-config=<file-path>" to specify custom config file
Hiral via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 27 05:16:55 PDT 2020
Hiralo added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:330
if (!Config.empty()) {
if (llvm::ErrorOr<ClangTidyOptions> ParsedConfig =
parseConfiguration(Config)) {
----------------
Hiralo wrote:
> DmitryPolukhin wrote:
> > I think you can make this option much simpler if you just read file content and use it or `Config` here. No changes in clang-tools-extra/clang-tidy/ClangTidyOptions.h/.cpp will be required.
> Sorry, didn't get. Can you please elaborate/pseudocode?
>
> I think you can make this option much simpler if you just read file content and use it or `Config` here. No changes in clang-tools-extra/clang-tidy/ClangTidyOptions.h/.cpp will be required.
Are you suggesting to...
(a) as per this patch have option '--config-file' (ClangTidyMain.cpp changes)
(b) read this file in ClangTidyMain.cpp itself and
(c) pass YAML o/p to code-flow-of-config option (again change only in ClangTidyMain.cpp).
if so...
Shouldn't at call to tryReadConfigFile() kind of call in ClangTidyMain.cpp?
Can you please point me to LLVM/Clang File IO calls/examples?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89936/new/
https://reviews.llvm.org/D89936
More information about the cfe-commits
mailing list