86 cling::Interpreter::PushTransactionRAII RAII(
fInterp);
87 const clang::ParmVarDecl *pvd =
GetDecl();
89 if (pvd->hasUninstantiatedDefaultArg()) {
91 fInterp->getSema().BuildCXXDefaultArgExpr(clang::SourceLocation(),
92 const_cast<clang::FunctionDecl*
>(fd),
93 const_cast<clang::ParmVarDecl*
>(pvd));
95 const clang::Expr *expr =
nullptr;
96 if (pvd->hasUninstantiatedDefaultArg()) {
98 expr = pvd->getUninstantiatedDefaultArg();
100 expr = pvd->getDefaultArg();
102 clang::ASTContext &context = pvd->getASTContext();
103 clang::PrintingPolicy policy(context.getPrintingPolicy());
104 TTHREAD_TLS_DECL( std::string, buf );
106 llvm::raw_string_ostream out(buf);
111 bool implicitInit =
false;
112 if (
const clang::CXXConstructExpr *construct =
113 llvm::dyn_cast<clang::CXXConstructExpr>(expr)) {
114 implicitInit = (pvd->getInitStyle() == clang::VarDecl::CallInit) &&
115 (construct->getNumArgs() == 0) &&
116 !construct->isListInitialization();
119 if (pvd->getInitStyle() == clang::VarDecl::CallInit) {
122 else if (pvd->getInitStyle() == clang::VarDecl::CInit) {
125 expr->printPretty(out,
nullptr, policy, 0);
126 if (pvd->getInitStyle() == clang::VarDecl::CallInit) {