diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp')
| -rw-r--r-- | clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp index 16b6f20d424..50c2f8906b4 100644 --- a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp @@ -26,7 +26,7 @@ const char CastSequence[] = "sequence"; AST_MATCHER(Type, sugaredNullptrType) { const Type *DesugaredType = Node.getUnqualifiedDesugaredType(); - if (const BuiltinType *BT = dyn_cast<BuiltinType>(DesugaredType)) + if (const auto *BT = dyn_cast<BuiltinType>(DesugaredType)) return BT->getKind() == BuiltinType::NullPtr; return false; } @@ -188,7 +188,7 @@ public: // Only VisitStmt is overridden as we shouldn't find other base AST types // within a cast expression. bool VisitStmt(Stmt *S) { - CastExpr *C = dyn_cast<CastExpr>(S); + auto *C = dyn_cast<CastExpr>(S); // Catch the castExpr inside cxxDefaultArgExpr. if (auto *E = dyn_cast<CXXDefaultArgExpr>(S)) C = dyn_cast<CastExpr>(E->getExpr()); |

