[clang-tidy] Transformer checks now store IncludeStyle option

This commit is contained in:
Nathan James 2020-05-16 01:14:55 +01:00
parent 80af39ead8
commit 7af0c8559b
2 changed files with 10 additions and 0 deletions

View File

@ -112,6 +112,12 @@ void TransformerClangTidyCheck::check(
}
}
void TransformerClangTidyCheck::storeOptions(
ClangTidyOptions::OptionMap &Opts) {
Options.store(Opts, "IncludeStyle", IncludeStyle,
IncludeSorter::getMapping());
}
} // namespace utils
} // namespace tidy
} // namespace clang

View File

@ -67,6 +67,10 @@ public:
void registerMatchers(ast_matchers::MatchFinder *Finder) final;
void check(const ast_matchers::MatchFinder::MatchResult &Result) final;
/// Derived classes that override this function should call this method from
/// the overridden method.
void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
private:
Optional<transformer::RewriteRule> Rule;
const IncludeSorter::IncludeStyle IncludeStyle;