Eugene.Zelenko added inline comments.

================
Comment at: clang-tidy/modernize/ReplaceGenericFunctorCallCheck.cpp:1
+//===--- ReplaceGenericFunctorCallCheck.cpp - 
clang-tidy-------------------===//
+//
----------------
Please add space after clang-tidy.


================
Comment at: clang-tidy/modernize/ReplaceGenericFunctorCallCheck.cpp:48
+    const MatchFinder::MatchResult &Result) {
+
+  const auto *Source = Result.SourceManager;
----------------
Please remove empty line.


================
Comment at: clang-tidy/modernize/ReplaceGenericFunctorCallCheck.cpp:49
+
+  const auto *Source = Result.SourceManager;
+
----------------
Please don't use auto when type could not be deduced from same statement.


================
Comment at: clang-tidy/modernize/ReplaceGenericFunctorCallCheck.cpp:53
+  if (Functor && Functor->isTypeDependent()) {
+    const auto EndLoc = Functor->getNumArgs() == 0
+                            ? Functor->getRParenLoc()
----------------
Please don't use auto when type could not be deduced from same statement.


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


================
Comment at: clang-tidy/modernize/ReplaceGenericFunctorCallCheck.cpp:78
+
+    const auto *MFunc = BinOp->getRHS();
+    const char *MFuncEnd = Source->getCharacterData(Paren->getRParen());
----------------
Please don't use auto when type could not be deduced from same statement.


================
Comment at: clang-tidy/modernize/ReplaceGenericFunctorCallCheck.cpp:96
+    const std::string &OriginalParams) {
+
+  std::ostringstream Replace;
----------------
Please remove empty line.


================
Comment at: clang-tidy/modernize/ReplaceGenericFunctorCallCheck.h:1
+//===--- ReplaceGenericFunctorCallCheck.h - clang-tidy-----------*- C++ 
-*-===//
+//
----------------
Please add space after clang-tidy.


================
Comment at: docs/ReleaseNotes.rst:60
 
+- New `modernize-replace-generic-functor-call
+  
<http://clang.llvm.org/extra/clang-tidy/checks/modernize-replace-generic-functor-call.html>`_
 check
----------------
Please sort new checks list in alphabetical order.


================
Comment at: docs/ReleaseNotes.rst:63
+
+  Replace type dependent functor, function pointer and pointer to member call
+  to the proper ``std::invoke()`` in C++17 or newer codebases.
----------------
Replace -> Replaces.


================
Comment at: docs/clang-tidy/checks/modernize-replace-generic-functor-call.rst:6
+
+This check finds and replace the functor, function pointer and pointer to 
member
+calls to the proper ``std::invoke()`` call. It works only in C++17 or newer.
----------------
Please make first statement same as in Release Notes.


================
Comment at: docs/clang-tidy/checks/modernize-replace-generic-functor-call.rst:15
+  void f(T1 func, T2 mfp) {
+    func(2); // Replace to ::std::invoke(func, 2)
+    Foo foo;
----------------
Please use more descriptive identifiers and separate statements with empty 
lines. Same for other places.


Repository:
  rCTE Clang Tools Extra

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