This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Refactor InheritParentConfig from ClangTidyOptions
DraftPublic

Authored by njames93 on Nov 26 2020, 4:24 PM.
This is a draft revision that has not yet been submitted for review.

Details

Reviewers
None
Summary

This option doesn't make much sense being in ClangTidyOptions as it is only used when reading configuration.
Instead of putting the option there, a new class ClangTidyInheritableOptions has been added, which extends ClangTidyOptions.
This should be used when reading configuration that is able to inherit from a parent.

Diff Detail

Event Timeline

njames93 created this revision.Nov 26 2020, 4:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 26 2020, 4:24 PM

This solves the problem, but in a heavyweight way that seems out-of-proportion to the size of the problem.

If it doesn't make sense to change the Optional<bool> to bool = false and deal wit the merging in an ad-hoc way, I think I prefer the way it is now.

This solves the problem, but in a heavyweight way that seems out-of-proportion to the size of the problem.

If it doesn't make sense to change the Optional<bool> to bool = false and deal wit the merging in an ad-hoc way, I think I prefer the way it is now.

It's not super heavyweight, but I agree its a little more involved than expected for the small problem it fixes