MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / New

Function New

ASTHelpers.cpp:695–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

693//-----------------------------------------------------------------------------
694
695CXXNewExpr* New(ArrayRef<Expr*> placementArgs, const Expr* expr, QualType t)
696{
697 auto& ctx = GetGlobalAST();
698
699 return CXXNewExpr::Create(ctx,
700 false,
701 nullptr,
702 nullptr,
703#if IS_CLANG_NEWER_THAN(20)
704 ImplicitAllocationParameters{AlignedAllocationMode::Yes},
705#else
706 true,
707#endif
708 false,
709 placementArgs,
710 SourceRange{},
711 std::optional<Expr*>{},
712 CXXNewInitializationStyle::Parens,
713 const_cast<Expr*>(expr),
714 Ptr(t),
715 ctx.getTrivialTypeSourceInfo(t),
716 SourceRange{},
717 SourceRange{});
718}
719//-----------------------------------------------------------------------------
720
721BinaryOperator* Mul(Expr* lhs, Expr* rhs)

Callers 2

InsertCoroutineMethod · 0.85

Calls 1

PtrFunction · 0.85

Tested by

no test coverage detected