eduucaldas added a reviewer: gribozavr2.
eduucaldas added inline comments.

================
Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:48-58
+static Expr *IgnoreImplicitCXXConstructExpr(Expr *E) {
+  if (auto *C = dyn_cast<CXXConstructExpr>(E)) {
+    auto NumArgs = C->getNumArgs();
+    if (NumArgs == 1 || (NumArgs > 1 && isa<CXXDefaultArgExpr>(C->getArg(1)))) 
{
+      auto *A = C->getArg(0);
+      if (A->getSourceRange() == E->getSourceRange())
+        return A;
----------------
Should this go into `IgnoreExpr` as well?

If yes, should we unify this with the lambda inside 
`IgnoreUnlessSpelledInSource`, thus removing the lambda and using this free 
function instead?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86699/new/

https://reviews.llvm.org/D86699

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

Reply via email to