alexfh requested changes to this revision.
alexfh added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang-tidy/modernize/UseAutoCheck.cpp:331
+void UseAutoCheck::replaceExpr(const DeclStmt *D, ASTContext *Context,
+                               TypeFn GetType, StringRef Message) {
   const auto *FirstDecl = dyn_cast<VarDecl>(*D->decl_begin());
----------------
It seems that `replaceExpr` can be implemented in a non-generic way: `GetType` 
could be a `std::function<QualType(Expr*)>` and the use of `ExprType` in 
`cast<ExprType>`could be replaced with a check whether 
`V->getInit()->IgnoreParenImpCasts()->getStmtClass()` is a specific 
`StmtClass`. WDYT?


https://reviews.llvm.org/D25316



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to