diff --git a/clang-tools-extra/clang-tidy/readability/UselessReturnValueCheck.cpp b/clang-tools-extra/clang-tidy/readability/UselessReturnValueCheck.cpp --- a/clang-tools-extra/clang-tidy/readability/UselessReturnValueCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/UselessReturnValueCheck.cpp @@ -30,14 +30,13 @@ forEachDescendant( returnStmt(hasReturnValue(Int0Var)).bind("return-to-void")), unless(hasDescendant(returnStmt(unless(hasReturnValue(Int0Var))))), - unless(hasDescendant( - binaryOperator(isAssignmentOperator(), - hasLHS(declRefExpr( - to(varDecl(equalsBoundNode("retvar")))))))), - unless(hasDescendant( - cxxOperatorCallExpr(isAssignmentOperator(), - hasLHS(hasDescendant(declRefExpr( - to(varDecl(equalsBoundNode("retvar"))))))))), + unless(hasDescendant(binaryOperator( + isAssignmentOperator(), + hasLHS(declRefExpr(to(varDecl(equalsBoundNode("retvar")))))))), + unless(hasDescendant(cxxOperatorCallExpr( + isAssignmentOperator(), + hasLHS(hasDescendant( + declRefExpr(to(varDecl(equalsBoundNode("retvar"))))))))), unless(hasDescendant( unaryOperator(hasAnyOperatorName("++", "--", "&"), hasUnaryOperand(ignoringImplicit(declRefExpr(