Eugene.Zelenko added inline comments.
================ Comment at: clang-tidy/altera/IdDependentBackwardBranchCheck.cpp:115 +IdDependentBackwardBranchCheck::hasIdDepField(const Expr *Expression) { + if (const MemberExpr *MemberExpression = dyn_cast<MemberExpr>(Expression)) { + const FieldDecl *CheckField = ---------------- May be comments were shifted with code, but here const auto * could be used, because type is spelled in dyn_cast<>. ================ Comment at: clang-tidy/altera/IdDependentBackwardBranchCheck.cpp:116 + if (const MemberExpr *MemberExpression = dyn_cast<MemberExpr>(Expression)) { + const FieldDecl *CheckField = + dyn_cast<FieldDecl>(MemberExpression->getMemberDecl()); ---------------- May be comments were shifted with code, but here const auto * could be used, because type is spelled in dyn_cast<>. ================ Comment at: clang-tidy/altera/IdDependentBackwardBranchCheck.cpp:124 + } + for (const Stmt *Child : Expression->children()) { + if (const Expr *ChildExpression = dyn_cast<Expr>(Child)) { ---------------- May be comments were shifted with code, but here const auto * could be used, because type is iterator. ================ Comment at: clang-tidy/altera/IdDependentBackwardBranchCheck.cpp:125 + for (const Stmt *Child : Expression->children()) { + if (const Expr *ChildExpression = dyn_cast<Expr>(Child)) { + IdDependencyRecord *Result = hasIdDepField(ChildExpression); ---------------- May be comments were shifted with code, but here const auto * could be used, because type is spelled in dyn_cast<>. ================ Comment at: clang-tidy/altera/IdDependentBackwardBranchCheck.cpp:165 + if (RefExpr) { + const auto RefVar = dyn_cast<VarDecl>(RefExpr->getDecl()); + // If variable isn't ID-dependent, but RefVar is. ---------------- const auto *. Same in other dyn_cast<>. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70094/new/ https://reviews.llvm.org/D70094 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits