JonasToth added inline comments.

================
Comment at: clang-tidy/modernize/ReplaceGenericFunctorCallCheck.cpp:70
+  if (MFunctor && MFunctor->isTypeDependent()) {
+    const auto *Paren = static_cast<const ParenExpr *>(MFunctor->getCallee());
+    const auto *BinOp =
----------------
Eugene.Zelenko wrote:
> I think you should use LLVM's cast instead, but I'm not sure which one. Same 
> for other places.
in this case i think `const auto *BinOp = 
dyn_cast<BinaryOperator>(Paren->getSubExpr());` would match.

As a safety measure adding a `assert(BinOp && "No Binary Operator as 
subexpression");` helps spotting bugs.


================
Comment at: test/clang-tidy/modernize-replace-generic-functor-call.cpp:24
+template <class T>
+void func2(T func) {
+  func(1);
----------------
Please add tests that include the usage of macros to do the function call.
In my opinions these should be excluded from the FIXITs and only the warning 
should be emitted.


https://reviews.llvm.org/D52281



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

Reply via email to