diff --git a/clang/include/clang/AST/IgnoreExpr.h b/clang/include/clang/AST/IgnoreExpr.h index 917bada61fa6f..bf098f3f09068 100644 --- a/clang/include/clang/AST/IgnoreExpr.h +++ b/clang/include/clang/AST/IgnoreExpr.h @@ -17,16 +17,6 @@ #include "clang/AST/ExprCXX.h" namespace clang { -namespace detail { -/// Given an expression E and functions Fn_1,...,Fn_n : Expr * -> Expr *, -/// Return Fn_n(...(Fn_1(E))) -inline Expr *IgnoreExprNodesImpl(Expr *E) { return E; } -template -Expr *IgnoreExprNodesImpl(Expr *E, FnTy &&Fn, FnTys &&... Fns) { - return IgnoreExprNodesImpl(std::forward(Fn)(E), - std::forward(Fns)...); -} -} // namespace detail /// Given an expression E and functions Fn_1,...,Fn_n : Expr * -> Expr *, /// Recursively apply each of the functions to E until reaching a fixed point. @@ -35,7 +25,7 @@ template Expr *IgnoreExprNodes(Expr *E, FnTys &&... Fns) { Expr *LastE = nullptr; while (E != LastE) { LastE = E; - E = detail::IgnoreExprNodesImpl(E, std::forward(Fns)...); + ((E = std::forward(Fns)(E)), ...); } return E; }