malcolm.parsons marked 15 inline comments as done. malcolm.parsons added inline comments.
================ Comment at: test/clang-tidy/modernize-use-auto-cast.cpp:14 + long l = 1; + int i1 = static_cast<int>(l); + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use auto when initializing with a cast to avoid duplicating the type name ---------------- Prazek wrote: > How do you handle cases like > > long l = static_cast<int>(i1); > > I would expect it to produce warning, but not produce fixit (because it might > change the behavior of program), but I still would like to get information > about it because it seems like a bug. The check requires the VarDecl and Initializer to have the same type, so there is no warning. I don't think this check should warn about it. https://reviews.llvm.org/D25316 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits