diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/cppcoreguidelines')
-rw-r--r-- | clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp | 4 | ||||
-rw-r--r-- | clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp index e64d36a6c4f..804b2b0579d 100644 --- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp +++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp @@ -196,7 +196,7 @@ computeInsertions(const CXXConstructorDecl::init_const_range &Inits, // Add all fields between current field up until the next intializer. for (; Decl != std::end(OrderedDecls) && *Decl != InitDecl; ++Decl) { - if (const T *D = dyn_cast<T>(*Decl)) { + if (const auto *D = dyn_cast<T>(*Decl)) { if (DeclsToInit.count(D) > 0) Insertions.back().Initializers.emplace_back(getName(D)); } @@ -208,7 +208,7 @@ computeInsertions(const CXXConstructorDecl::init_const_range &Inits, // Add remaining decls that require initialization. for (; Decl != std::end(OrderedDecls); ++Decl) { - if (const T *D = dyn_cast<T>(*Decl)) { + if (const auto *D = dyn_cast<T>(*Decl)) { if (DeclsToInit.count(D) > 0) Insertions.back().Initializers.emplace_back(getName(D)); } diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp index 62f791e6576..e1f3d022323 100644 --- a/clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp +++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp @@ -82,8 +82,7 @@ join(ArrayRef<SpecialMemberFunctionsCheck::SpecialMemberFunctionKind> SMFS, void SpecialMemberFunctionsCheck::check( const MatchFinder::MatchResult &Result) { - const CXXRecordDecl *MatchedDecl = - Result.Nodes.getNodeAs<CXXRecordDecl>("class-def"); + const auto *MatchedDecl = Result.Nodes.getNodeAs<CXXRecordDecl>("class-def"); if (!MatchedDecl) return; |