diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp index c6d6fcc2e2c..e41a3aec602 100644 --- a/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp @@ -189,13 +189,11 @@ static bool checkTokenIsAutoPtr(SourceLocation TokenStart, ReplaceAutoPtrCheck::ReplaceAutoPtrCheck(StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), - IncludeStyle(Options.get("IncludeStyle", "llvm") == "llvm" - ? IncludeSorter::IS_LLVM - : IncludeSorter::IS_Google) {} + IncludeStyle(IncludeSorter::parseIncludeStyle( + Options.get("IncludeStyle", "llvm"))) {} void ReplaceAutoPtrCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { - Options.store(Opts, "IncludeStyle", - IncludeStyle == IncludeSorter::IS_LLVM ? "llvm" : "google"); + Options.store(Opts, "IncludeStyle", IncludeSorter::toString(IncludeStyle)); } void ReplaceAutoPtrCheck::registerMatchers(MatchFinder *Finder) { |