summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/cppcoreguidelines
diff options
context:
space:
mode:
authorPiotr Padlewski <piotr.padlewski@gmail.com>2016-12-14 15:29:23 +0000
committerPiotr Padlewski <piotr.padlewski@gmail.com>2016-12-14 15:29:23 +0000
commit08124b110a9e1ffc285998db1abd42e72ab83c8b (patch)
treef725b8751aa4b9e95f1791bd97775d39afbcadce /clang-tools-extra/clang-tidy/cppcoreguidelines
parentfacbd356963fcf417062e2838d676b1b29ebcf00 (diff)
downloadbcm5719-llvm-08124b110a9e1ffc285998db1abd42e72ab83c8b.tar.gz
bcm5719-llvm-08124b110a9e1ffc285998db1abd42e72ab83c8b.zip
modernize-use-auto NFC fixes
llvm-svn: 289656
Diffstat (limited to 'clang-tools-extra/clang-tidy/cppcoreguidelines')
-rw-r--r--clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp4
-rw-r--r--clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp3
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;
OpenPOWER on IntegriCloud