Prazek added a comment. Thanks for the check. Have you run it on llvm?
================ Comment at: clang-tidy/modernize/ReturnBracedInitListCheck.cpp:27-32 + auto soughtConstructExpr = + cxxConstructExpr(unless(isListInitialization())).bind("ctor"); + + auto hasConstructExpr = has(ignoringImplicit(soughtConstructExpr)); + + auto ctorAsArgument = materializeTemporaryExpr( ---------------- Uppercase ================ Comment at: clang-tidy/modernize/ReturnBracedInitListCheck.cpp:38 + returns(recordType()), // We only care about record types. + hasDescendant(returnStmt(hasDescendant(ctorAsArgument)))) + .bind("fn"), ---------------- Wouldn't returnStmt(has(ctorAsArgument)) be sufficient? or maybe returnStmt(has(ignoringImplici(ctorAsArgument))) hasDescendant is slow, and besides it probably match for cases like: return fun(A(a, b, c)); where fun is call, and ctorAsArgument will match to A() Repository: rL LLVM https://reviews.llvm.org/D28768 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits