Author: Timm Baeder Date: 2025-01-15T10:09:10+01:00 New Revision: 4cec0ba92955c353c52efe728b2cfef3fbdf60f8
URL: https://github.com/llvm/llvm-project/commit/4cec0ba92955c353c52efe728b2cfef3fbdf60f8 DIFF: https://github.com/llvm/llvm-project/commit/4cec0ba92955c353c52efe728b2cfef3fbdf60f8.diff LOG: [clang][bytecode][NFC] Simplify VisitCXXDefaultArgExpr (#123024) We have `discard()` these days. Added: Modified: clang/lib/AST/ByteCode/Compiler.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp index c6e2a1e50a2aa7..4bfb80589620c1 100644 --- a/clang/lib/AST/ByteCode/Compiler.cpp +++ b/clang/lib/AST/ByteCode/Compiler.cpp @@ -4815,12 +4815,7 @@ template <class Emitter> bool Compiler<Emitter>::VisitCXXDefaultArgExpr(const CXXDefaultArgExpr *E) { SourceLocScope<Emitter> SLS(this, E); - const Expr *SubExpr = E->getExpr(); - if (std::optional<PrimType> T = classify(E->getExpr())) - return this->visit(SubExpr); - - assert(Initializing); - return this->visitInitializer(SubExpr); + return this->delegate(E->getExpr()); } template <class Emitter> _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits