@@ -1675,6 +1675,9 @@ namespace Cpp {
16751675 //
16761676 ASTContext& C = FD->getASTContext ();
16771677 PrintingPolicy Policy (C.getPrintingPolicy ());
1678+ #if CLANG_VERSION_MAJOR > 16
1679+ Policy.SuppressElaboration = true ;
1680+ #endif
16781681 refType = kNotReference ;
16791682 if (QT->isRecordType () && forArgument) {
16801683 get_type_as_string (QT, type_name, C, Policy);
@@ -1989,18 +1992,22 @@ namespace Cpp {
19891992 EReferenceType refType = kNotReference ;
19901993 bool isPointer = false ;
19911994
1995+ std::ostringstream typedefbuf;
1996+ std::ostringstream callbuf;
1997+
1998+ collect_type_info (FD, QT, typedefbuf, callbuf, type_name, refType,
1999+ isPointer, indent_level, false );
2000+
2001+ buf << typedefbuf.str ();
2002+
19922003 buf << " if (ret) {\n " ;
19932004 ++indent_level;
19942005 {
1995- std::ostringstream typedefbuf;
1996- std::ostringstream callbuf;
19972006 //
19982007 // Write the placement part of the placement new.
19992008 //
20002009 indent (callbuf, indent_level);
20012010 callbuf << " new (ret) " ;
2002- collect_type_info (FD, QT, typedefbuf, callbuf, type_name, refType,
2003- isPointer, indent_level, false );
20042011 //
20052012 // Write the type part of the placement new.
20062013 //
0 commit comments