alexfh added inline comments.

================
Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:246
+                                   ASTContext *Ctx) {
+  std::function<const Expr *(const Expr *)> SkipParensParents =
+      [&](const Expr *E) {
----------------
hokein wrote:
> nit: I'd use `auto` to avoid this long type name, the type is clear to me, it 
> is a lambda function.
I first tried it with an `auto`, but the recursive call below didn't compile. 
Works fine without recursion though.


================
Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:250
+          if (const Expr *Parent = Node.get<ParenExpr>())
+            return SkipParensParents(Parent);
+        }
----------------
hokein wrote:
> nit: we can easily avoid the recursive call by using while here, I think.
Turned out that iterative approach here doesn't complicate code as much as I 
thought it would.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D52989



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

Reply via email to