diff options
author | Nathan James <n.james93@hotmail.co.uk> | 2020-06-28 10:18:32 +0100 |
---|---|---|
committer | Nathan James <n.james93@hotmail.co.uk> | 2020-06-28 10:18:33 +0100 |
commit | b9306fd042ce1c11d84f05d2124dfdc65b8331fe (patch) | |
tree | 0ac764df9eb8bc25d683c1e9436f58fe33a50f5b /clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp | |
parent | abafb655c85d92c02c19c8723ef9ecc5d48574bf (diff) | |
download | llvm-b9306fd042ce1c11d84f05d2124dfdc65b8331fe.zip llvm-b9306fd042ce1c11d84f05d2124dfdc65b8331fe.tar.gz llvm-b9306fd042ce1c11d84f05d2124dfdc65b8331fe.tar.bz2 |
[clang-tidy] Reworked enum options handling(again)
Following on from D77085, I was never happy with the passing a mapping to the option get/store functions. This patch addresses this by using explicit specializations to handle the serializing and deserializing of enum options.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D82188
Diffstat (limited to 'clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp b/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp index 5b5f2ff..5de53b1 100644 --- a/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp +++ b/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp @@ -69,7 +69,6 @@ UnnecessaryValueParamCheck::UnnecessaryValueParamCheck( StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), IncludeStyle(Options.getLocalOrGlobal("IncludeStyle", - utils::IncludeSorter::getMapping(), utils::IncludeSorter::IS_LLVM)), AllowedTypes( utils::options::parseStringList(Options.get("AllowedTypes", ""))) {} @@ -181,8 +180,7 @@ void UnnecessaryValueParamCheck::registerPPCallbacks( void UnnecessaryValueParamCheck::storeOptions( ClangTidyOptions::OptionMap &Opts) { - Options.store(Opts, "IncludeStyle", IncludeStyle, - utils::IncludeSorter::getMapping()); + Options.store(Opts, "IncludeStyle", IncludeStyle); Options.store(Opts, "AllowedTypes", utils::options::serializeStringList(AllowedTypes)); } |