d created this revision. d requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
The existing code causes an infinite recursion. This is likely an oversight of commit c0e5e3fbfa504c37 <https://reviews.llvm.org/rGc0e5e3fbfa504c3792023d0db9008b08caa6b6d7> [1] where the intent must have been to call the non-const overload. [1] https://reviews.llvm.org/D87278 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D100347 Files: clang/include/clang/AST/IgnoreExpr.h Index: clang/include/clang/AST/IgnoreExpr.h =================================================================== --- clang/include/clang/AST/IgnoreExpr.h +++ clang/include/clang/AST/IgnoreExpr.h @@ -41,7 +41,7 @@ template <typename... FnTys> const Expr *IgnoreExprNodes(const Expr *E, FnTys &&...Fns) { - return const_cast<Expr *>(IgnoreExprNodes(E, std::forward<FnTys>(Fns)...)); + return IgnoreExprNodes(const_cast<Expr *>(E), std::forward<FnTys>(Fns)...); } inline Expr *IgnoreImplicitCastsSingleStep(Expr *E) {
Index: clang/include/clang/AST/IgnoreExpr.h =================================================================== --- clang/include/clang/AST/IgnoreExpr.h +++ clang/include/clang/AST/IgnoreExpr.h @@ -41,7 +41,7 @@ template <typename... FnTys> const Expr *IgnoreExprNodes(const Expr *E, FnTys &&...Fns) { - return const_cast<Expr *>(IgnoreExprNodes(E, std::forward<FnTys>(Fns)...)); + return IgnoreExprNodes(const_cast<Expr *>(E), std::forward<FnTys>(Fns)...); } inline Expr *IgnoreImplicitCastsSingleStep(Expr *E) {
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits