diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/cppcoreguidelines')
3 files changed, 10 insertions, 9 deletions
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp index 30792e7777c..67e921bc3e8 100644 --- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp +++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp @@ -22,7 +22,7 @@ namespace cppcoreguidelines { ProBoundsConstantArrayIndexCheck::ProBoundsConstantArrayIndexCheck( StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), GslHeader(Options.get("GslHeader", "")), - IncludeStyle(IncludeSorter::parseIncludeStyle( + IncludeStyle(utils::IncludeSorter::parseIncludeStyle( Options.get("IncludeStyle", "llvm"))) {} void ProBoundsConstantArrayIndexCheck::storeOptions( @@ -36,8 +36,8 @@ void ProBoundsConstantArrayIndexCheck::registerPPCallbacks( if (!getLangOpts().CPlusPlus) return; - Inserter.reset(new IncludeInserter(Compiler.getSourceManager(), - Compiler.getLangOpts(), IncludeStyle)); + Inserter.reset(new utils::IncludeInserter( + Compiler.getSourceManager(), Compiler.getLangOpts(), IncludeStyle)); Compiler.getPreprocessor().addPPCallbacks(Inserter->CreatePPCallbacks()); } diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.h index b83475ca419..28b24a6b826 100644 --- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.h +++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.h @@ -24,8 +24,8 @@ namespace cppcoreguidelines { /// http://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines-pro-bounds-constant-array-index.html class ProBoundsConstantArrayIndexCheck : public ClangTidyCheck { const std::string GslHeader; - const IncludeSorter::IncludeStyle IncludeStyle; - std::unique_ptr<IncludeInserter> Inserter; + const utils::IncludeSorter::IncludeStyle IncludeStyle; + std::unique_ptr<utils::IncludeInserter> Inserter; public: ProBoundsConstantArrayIndexCheck(StringRef Name, ClangTidyContext *Context); diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp index 9ba8bd902d7..d5d129d4436 100644 --- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp +++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp @@ -35,7 +35,7 @@ void fieldsRequiringInit(const RecordDecl::field_range &Fields, continue; QualType Type = F->getType(); if (!F->hasInClassInitializer() && - type_traits::isTriviallyDefaultConstructible(Type, Context)) + utils::type_traits::isTriviallyDefaultConstructible(Type, Context)) FieldsToInit.insert(F); } } @@ -114,12 +114,12 @@ struct IntializerInsertion { SourceLocation Location; switch (Placement) { case InitializerPlacement::New: - Location = lexer_utils::getPreviousNonCommentToken( + Location = utils::lexer::getPreviousNonCommentToken( Context, Constructor.getBody()->getLocStart()) .getLocation(); break; case InitializerPlacement::Before: - Location = lexer_utils::getPreviousNonCommentToken( + Location = utils::lexer::getPreviousNonCommentToken( Context, Where->getSourceRange().getBegin()) .getLocation(); break; @@ -389,7 +389,8 @@ void ProTypeMemberInitCheck::checkMissingBaseClassInitializer( if (const auto *BaseClassDecl = getCanonicalRecordDecl(Base.getType())) { AllBases.emplace_back(BaseClassDecl); if (!BaseClassDecl->field_empty() && - type_traits::isTriviallyDefaultConstructible(Base.getType(), Context)) + utils::type_traits::isTriviallyDefaultConstructible( + Base.getType(), Context)) BasesToInit.insert(BaseClassDecl); } } |