Lines Matching refs:OS

36     raw_ostream &OS;  member in __anon7f41149f0111::StmtPrinter
45 : OS(os), IndentLevel(Indentation), Helper(helper), Policy(Policy) {} in StmtPrinter()
57 OS << ";\n"; in PrintStmt()
80 OS << "<null expr>"; in PrintExpr()
85 OS << " "; in Indent()
86 return OS; in Indent()
90 if (Helper && Helper->handledStmt(S,OS)) in Visit()
99 OS << "<<unknown expr type>>"; in VisitExpr()
117 OS << "{\n"; in PrintRawCompoundStmt()
125 D->print(OS, Policy, IndentLevel); in PrintRawDecl()
130 Decl::printGroup(Decls.data(), Decls.size(), OS, Policy, IndentLevel); in PrintRawDeclStmt()
140 OS << ";\n"; in VisitDeclStmt()
146 OS << "\n"; in VisitCompoundStmt()
153 OS << " ... "; in VisitCaseStmt()
156 OS << ":\n"; in VisitCaseStmt()
173 Attr->printPretty(OS, Policy); in VisitAttributedStmt()
180 OS << "if ("; in PrintRawIfStmt()
185 OS << ')'; in PrintRawIfStmt()
188 OS << ' '; in PrintRawIfStmt()
190 OS << (If->getElse() ? ' ' : '\n'); in PrintRawIfStmt()
192 OS << '\n'; in PrintRawIfStmt()
198 OS << "else"; in PrintRawIfStmt()
201 OS << ' '; in PrintRawIfStmt()
203 OS << '\n'; in PrintRawIfStmt()
205 OS << ' '; in PrintRawIfStmt()
208 OS << '\n'; in PrintRawIfStmt()
225 OS << ")"; in VisitSwitchStmt()
229 OS << " "; in VisitSwitchStmt()
231 OS << "\n"; in VisitSwitchStmt()
233 OS << "\n"; in VisitSwitchStmt()
244 OS << ")\n"; in VisitWhileStmt()
252 OS << " "; in VisitDoStmt()
254 OS << "\n"; in VisitDoStmt()
259 OS << "while ("; in VisitDoStmt()
261 OS << ");\n"; in VisitDoStmt()
272 OS << ";"; in VisitForStmt()
274 OS << " "; in VisitForStmt()
277 OS << ";"; in VisitForStmt()
279 OS << " "; in VisitForStmt()
282 OS << ") "; in VisitForStmt()
286 OS << "\n"; in VisitForStmt()
288 OS << "\n"; in VisitForStmt()
299 OS << " in "; in VisitObjCForCollectionStmt()
301 OS << ") "; in VisitObjCForCollectionStmt()
305 OS << "\n"; in VisitObjCForCollectionStmt()
307 OS << "\n"; in VisitObjCForCollectionStmt()
316 Node->getLoopVariable()->print(OS, SubPolicy, IndentLevel); in VisitCXXForRangeStmt()
317 OS << " : "; in VisitCXXForRangeStmt()
319 OS << ") {\n"; in VisitCXXForRangeStmt()
322 if (Policy.IncludeNewlines) OS << "\n"; in VisitCXXForRangeStmt()
328 OS << "__if_exists ("; in VisitMSDependentExistsStmt()
330 OS << "__if_not_exists ("; in VisitMSDependentExistsStmt()
334 Qualifier->print(OS, Policy); in VisitMSDependentExistsStmt()
336 OS << Node->getNameInfo() << ") "; in VisitMSDependentExistsStmt()
343 if (Policy.IncludeNewlines) OS << "\n"; in VisitGotoStmt()
349 OS << ";"; in VisitIndirectGotoStmt()
350 if (Policy.IncludeNewlines) OS << "\n"; in VisitIndirectGotoStmt()
355 if (Policy.IncludeNewlines) OS << "\n"; in VisitContinueStmt()
360 if (Policy.IncludeNewlines) OS << "\n"; in VisitBreakStmt()
367 OS << " "; in VisitReturnStmt()
370 OS << ";"; in VisitReturnStmt()
371 if (Policy.IncludeNewlines) OS << "\n"; in VisitReturnStmt()
379 OS << "volatile "; in VisitGCCAsmStmt()
381 OS << "("; in VisitGCCAsmStmt()
387 OS << " : "; in VisitGCCAsmStmt()
391 OS << ", "; in VisitGCCAsmStmt()
394 OS << '['; in VisitGCCAsmStmt()
395 OS << Node->getOutputName(i); in VisitGCCAsmStmt()
396 OS << "] "; in VisitGCCAsmStmt()
400 OS << " ("; in VisitGCCAsmStmt()
402 OS << ")"; in VisitGCCAsmStmt()
407 OS << " : "; in VisitGCCAsmStmt()
411 OS << ", "; in VisitGCCAsmStmt()
414 OS << '['; in VisitGCCAsmStmt()
415 OS << Node->getInputName(i); in VisitGCCAsmStmt()
416 OS << "] "; in VisitGCCAsmStmt()
420 OS << " ("; in VisitGCCAsmStmt()
422 OS << ")"; in VisitGCCAsmStmt()
427 OS << " : "; in VisitGCCAsmStmt()
431 OS << ", "; in VisitGCCAsmStmt()
436 OS << ");"; in VisitGCCAsmStmt()
437 if (Policy.IncludeNewlines) OS << "\n"; in VisitGCCAsmStmt()
444 OS << "{\n"; in VisitMSAsmStmt()
445 OS << Node->getAsmString() << "\n"; in VisitMSAsmStmt()
458 OS << "\n"; in VisitObjCAtTryStmt()
468 OS << ")"; in VisitObjCAtTryStmt()
471 OS << "\n"; in VisitObjCAtTryStmt()
479 OS << "\n"; in VisitObjCAtTryStmt()
493 OS << " "; in VisitObjCAtThrowStmt()
496 OS << ";\n"; in VisitObjCAtThrowStmt()
502 OS << ")"; in VisitObjCAtSynchronizedStmt()
504 OS << "\n"; in VisitObjCAtSynchronizedStmt()
510 OS << "\n"; in VisitObjCAutoreleasePoolStmt()
514 OS << "catch ("; in PrintRawCXXCatchStmt()
518 OS << "..."; in PrintRawCXXCatchStmt()
519 OS << ") "; in PrintRawCXXCatchStmt()
526 OS << "\n"; in VisitCXXCatchStmt()
533 OS << " "; in VisitCXXTryStmt()
536 OS << "\n"; in VisitCXXTryStmt()
550 OS << "\n"; in VisitSEHTryStmt()
554 OS << "__finally "; in PrintRawSEHFinallyStmt()
556 OS << "\n"; in PrintRawSEHFinallyStmt()
560 OS << "__except ("; in PrintRawSEHExceptHandler()
562 OS << ")\n"; in PrintRawSEHExceptHandler()
564 OS << "\n"; in PrintRawSEHExceptHandler()
570 OS << "\n"; in VisitSEHExceptStmt()
576 OS << "\n"; in VisitSEHFinallyStmt()
581 if (Policy.IncludeNewlines) OS << "\n"; in VisitSEHLeaveStmt()
590 raw_ostream &OS; member in __anon7f41149f0211::OMPClausePrinter
596 OMPClausePrinter(raw_ostream &OS, const PrintingPolicy &Policy) in OMPClausePrinter() argument
597 : OS(OS), Policy(Policy) { } in OMPClausePrinter()
604 OS << "if("; in VisitOMPIfClause()
606 OS << getOpenMPDirectiveName(Node->getNameModifier()) << ": "; in VisitOMPIfClause()
607 Node->getCondition()->printPretty(OS, nullptr, Policy, 0); in VisitOMPIfClause()
608 OS << ")"; in VisitOMPIfClause()
612 OS << "final("; in VisitOMPFinalClause()
613 Node->getCondition()->printPretty(OS, nullptr, Policy, 0); in VisitOMPFinalClause()
614 OS << ")"; in VisitOMPFinalClause()
618 OS << "num_threads("; in VisitOMPNumThreadsClause()
619 Node->getNumThreads()->printPretty(OS, nullptr, Policy, 0); in VisitOMPNumThreadsClause()
620 OS << ")"; in VisitOMPNumThreadsClause()
624 OS << "safelen("; in VisitOMPSafelenClause()
625 Node->getSafelen()->printPretty(OS, nullptr, Policy, 0); in VisitOMPSafelenClause()
626 OS << ")"; in VisitOMPSafelenClause()
630 OS << "simdlen("; in VisitOMPSimdlenClause()
631 Node->getSimdlen()->printPretty(OS, nullptr, Policy, 0); in VisitOMPSimdlenClause()
632 OS << ")"; in VisitOMPSimdlenClause()
636 OS << "collapse("; in VisitOMPCollapseClause()
637 Node->getNumForLoops()->printPretty(OS, nullptr, Policy, 0); in VisitOMPCollapseClause()
638 OS << ")"; in VisitOMPCollapseClause()
642 OS << "default(" in VisitOMPDefaultClause()
648 OS << "proc_bind(" in VisitOMPProcBindClause()
654 OS << "schedule(" in VisitOMPScheduleClause()
657 OS << ", "; in VisitOMPScheduleClause()
658 Node->getChunkSize()->printPretty(OS, nullptr, Policy); in VisitOMPScheduleClause()
660 OS << ")"; in VisitOMPScheduleClause()
664 OS << "ordered"; in VisitOMPOrderedClause()
666 OS << "("; in VisitOMPOrderedClause()
667 Num->printPretty(OS, nullptr, Policy, 0); in VisitOMPOrderedClause()
668 OS << ")"; in VisitOMPOrderedClause()
673 OS << "nowait"; in VisitOMPNowaitClause()
677 OS << "untied"; in VisitOMPUntiedClause()
681 OS << "nogroup"; in VisitOMPNogroupClause()
685 OS << "mergeable"; in VisitOMPMergeableClause()
688 void OMPClausePrinter::VisitOMPReadClause(OMPReadClause *) { OS << "read"; } in VisitOMPReadClause()
690 void OMPClausePrinter::VisitOMPWriteClause(OMPWriteClause *) { OS << "write"; } in VisitOMPWriteClause()
693 OS << "update"; in VisitOMPUpdateClause()
697 OS << "capture"; in VisitOMPCaptureClause()
701 OS << "seq_cst"; in VisitOMPSeqCstClause()
705 OS << "threads"; in VisitOMPThreadsClause()
708 void OMPClausePrinter::VisitOMPSIMDClause(OMPSIMDClause *) { OS << "simd"; } in VisitOMPSIMDClause()
711 OS << "device("; in VisitOMPDeviceClause()
712 Node->getDevice()->printPretty(OS, nullptr, Policy, 0); in VisitOMPDeviceClause()
713 OS << ")"; in VisitOMPDeviceClause()
717 OS << "num_teams("; in VisitOMPNumTeamsClause()
718 Node->getNumTeams()->printPretty(OS, nullptr, Policy, 0); in VisitOMPNumTeamsClause()
719 OS << ")"; in VisitOMPNumTeamsClause()
723 OS << "thread_limit("; in VisitOMPThreadLimitClause()
724 Node->getThreadLimit()->printPretty(OS, nullptr, Policy, 0); in VisitOMPThreadLimitClause()
725 OS << ")"; in VisitOMPThreadLimitClause()
729 OS << "priority("; in VisitOMPPriorityClause()
730 Node->getPriority()->printPretty(OS, nullptr, Policy, 0); in VisitOMPPriorityClause()
731 OS << ")"; in VisitOMPPriorityClause()
735 OS << "grainsize("; in VisitOMPGrainsizeClause()
736 Node->getGrainsize()->printPretty(OS, nullptr, Policy, 0); in VisitOMPGrainsizeClause()
737 OS << ")"; in VisitOMPGrainsizeClause()
741 OS << "num_tasks("; in VisitOMPNumTasksClause()
742 Node->getNumTasks()->printPretty(OS, nullptr, Policy, 0); in VisitOMPNumTasksClause()
743 OS << ")"; in VisitOMPNumTasksClause()
747 OS << "hint("; in VisitOMPHintClause()
748 Node->getHint()->printPretty(OS, nullptr, Policy, 0); in VisitOMPHintClause()
749 OS << ")"; in VisitOMPHintClause()
759 OS << (I == Node->varlist_begin() ? StartSym : ','); in VisitOMPClauseList()
760 cast<NamedDecl>(DRE->getDecl())->printQualifiedName(OS); in VisitOMPClauseList()
762 OS << (I == Node->varlist_begin() ? StartSym : ','); in VisitOMPClauseList()
763 (*I)->printPretty(OS, nullptr, Policy, 0); in VisitOMPClauseList()
770 OS << "private"; in VisitOMPPrivateClause()
772 OS << ")"; in VisitOMPPrivateClause()
778 OS << "firstprivate"; in VisitOMPFirstprivateClause()
780 OS << ")"; in VisitOMPFirstprivateClause()
786 OS << "lastprivate"; in VisitOMPLastprivateClause()
788 OS << ")"; in VisitOMPLastprivateClause()
794 OS << "shared"; in VisitOMPSharedClause()
796 OS << ")"; in VisitOMPSharedClause()
802 OS << "reduction("; in VisitOMPReductionClause()
809 OS << getOperatorSpelling(OOK); in VisitOMPReductionClause()
813 QualifierLoc->print(OS, Policy); in VisitOMPReductionClause()
814 OS << Node->getNameInfo(); in VisitOMPReductionClause()
816 OS << ":"; in VisitOMPReductionClause()
818 OS << ")"; in VisitOMPReductionClause()
824 OS << "linear"; in VisitOMPLinearClause()
826 OS << '(' in VisitOMPLinearClause()
831 OS << ')'; in VisitOMPLinearClause()
833 OS << ": "; in VisitOMPLinearClause()
834 Node->getStep()->printPretty(OS, nullptr, Policy, 0); in VisitOMPLinearClause()
836 OS << ")"; in VisitOMPLinearClause()
842 OS << "aligned"; in VisitOMPAlignedClause()
845 OS << ": "; in VisitOMPAlignedClause()
846 Node->getAlignment()->printPretty(OS, nullptr, Policy, 0); in VisitOMPAlignedClause()
848 OS << ")"; in VisitOMPAlignedClause()
854 OS << "copyin"; in VisitOMPCopyinClause()
856 OS << ")"; in VisitOMPCopyinClause()
862 OS << "copyprivate"; in VisitOMPCopyprivateClause()
864 OS << ")"; in VisitOMPCopyprivateClause()
871 OS << ")"; in VisitOMPFlushClause()
876 OS << "depend("; in VisitOMPDependClause()
877 OS << getOpenMPSimpleClauseTypeName(Node->getClauseKind(), in VisitOMPDependClause()
880 OS << " :"; in VisitOMPDependClause()
883 OS << ")"; in VisitOMPDependClause()
888 OS << "map("; in VisitOMPMapClause()
891 OS << getOpenMPSimpleClauseTypeName(OMPC_map, in VisitOMPMapClause()
893 OS << ','; in VisitOMPMapClause()
895 OS << getOpenMPSimpleClauseTypeName(OMPC_map, Node->getMapType()); in VisitOMPMapClause()
896 OS << ':'; in VisitOMPMapClause()
899 OS << ")"; in VisitOMPMapClause()
909 OMPClausePrinter Printer(OS, Policy); in PrintOMPExecutableDirective()
915 OS << ' '; in PrintOMPExecutableDirective()
917 OS << "\n"; in PrintOMPExecutableDirective()
969 OS << " ("; in VisitOMPCriticalDirective()
970 Node->getDirectiveName().printName(OS); in VisitOMPCriticalDirective()
971 OS << ")"; in VisitOMPCriticalDirective()
973 OS << " "; in VisitOMPCriticalDirective()
1084 Qualifier->print(OS, Policy); in VisitDeclRefExpr()
1086 OS << "template "; in VisitDeclRefExpr()
1087 OS << Node->getNameInfo(); in VisitDeclRefExpr()
1090 OS, Node->getTemplateArgs(), Node->getNumTemplateArgs(), Policy); in VisitDeclRefExpr()
1096 Qualifier->print(OS, Policy); in VisitDependentScopeDeclRefExpr()
1098 OS << "template "; in VisitDependentScopeDeclRefExpr()
1099 OS << Node->getNameInfo(); in VisitDependentScopeDeclRefExpr()
1102 OS, Node->getTemplateArgs(), Node->getNumTemplateArgs(), Policy); in VisitDependentScopeDeclRefExpr()
1107 Node->getQualifier()->print(OS, Policy); in VisitUnresolvedLookupExpr()
1109 OS << "template "; in VisitUnresolvedLookupExpr()
1110 OS << Node->getNameInfo(); in VisitUnresolvedLookupExpr()
1113 OS, Node->getTemplateArgs(), Node->getNumTemplateArgs(), Policy); in VisitUnresolvedLookupExpr()
1119 OS << (Node->isArrow() ? "->" : "."); in VisitObjCIvarRefExpr()
1121 OS << *Node->getDecl(); in VisitObjCIvarRefExpr()
1126 OS << "super."; in VisitObjCPropertyRefExpr()
1129 OS << "."; in VisitObjCPropertyRefExpr()
1131 OS << Node->getClassReceiver()->getName() << "."; in VisitObjCPropertyRefExpr()
1135 Node->getImplicitPropertyGetter()->getSelector().print(OS); in VisitObjCPropertyRefExpr()
1137 OS << Node->getExplicitProperty()->getName(); in VisitObjCPropertyRefExpr()
1143 OS << "["; in VisitObjCSubscriptRefExpr()
1145 OS << "]"; in VisitObjCSubscriptRefExpr()
1149 OS << PredefinedExpr::getIdentTypeName(Node->getIdentType()); in VisitPredefinedExpr()
1157 case CharacterLiteral::Wide: OS << 'L'; break; in VisitCharacterLiteral()
1158 case CharacterLiteral::UTF16: OS << 'u'; break; in VisitCharacterLiteral()
1159 case CharacterLiteral::UTF32: OS << 'U'; break; in VisitCharacterLiteral()
1164 OS << "'\\\\'"; in VisitCharacterLiteral()
1167 OS << "'\\''"; in VisitCharacterLiteral()
1171 OS << "'\\a'"; in VisitCharacterLiteral()
1174 OS << "'\\b'"; in VisitCharacterLiteral()
1181 OS << "'\\f'"; in VisitCharacterLiteral()
1184 OS << "'\\n'"; in VisitCharacterLiteral()
1187 OS << "'\\r'"; in VisitCharacterLiteral()
1190 OS << "'\\t'"; in VisitCharacterLiteral()
1193 OS << "'\\v'"; in VisitCharacterLiteral()
1197 OS << "'" << (char)value << "'"; in VisitCharacterLiteral()
1199 OS << "'\\x" << llvm::format("%02x", value) << "'"; in VisitCharacterLiteral()
1201 OS << "'\\u" << llvm::format("%04x", value) << "'"; in VisitCharacterLiteral()
1203 OS << "'\\U" << llvm::format("%08x", value) << "'"; in VisitCharacterLiteral()
1209 OS << Node->getValue().toString(10, isSigned); in VisitIntegerLiteral()
1215 case BuiltinType::Char_U: OS << "i8"; break; in VisitIntegerLiteral()
1216 case BuiltinType::UChar: OS << "Ui8"; break; in VisitIntegerLiteral()
1217 case BuiltinType::Short: OS << "i16"; break; in VisitIntegerLiteral()
1218 case BuiltinType::UShort: OS << "Ui16"; break; in VisitIntegerLiteral()
1220 case BuiltinType::UInt: OS << 'U'; break; in VisitIntegerLiteral()
1221 case BuiltinType::Long: OS << 'L'; break; in VisitIntegerLiteral()
1222 case BuiltinType::ULong: OS << "UL"; break; in VisitIntegerLiteral()
1223 case BuiltinType::LongLong: OS << "LL"; break; in VisitIntegerLiteral()
1224 case BuiltinType::ULongLong: OS << "ULL"; break; in VisitIntegerLiteral()
1228 static void PrintFloatingLiteral(raw_ostream &OS, FloatingLiteral *Node, in PrintFloatingLiteral() argument
1232 OS << Str; in PrintFloatingLiteral()
1234 OS << '.'; // Trailing dot in order to separate from ints. in PrintFloatingLiteral()
1244 case BuiltinType::Float: OS << 'F'; break; in PrintFloatingLiteral()
1245 case BuiltinType::LongDouble: OS << 'L'; break; in PrintFloatingLiteral()
1250 PrintFloatingLiteral(OS, Node, /*PrintSuffix=*/true); in VisitFloatingLiteral()
1255 OS << "i"; in VisitImaginaryLiteral()
1259 Str->outputString(OS); in VisitStringLiteral()
1262 OS << "("; in VisitParenExpr()
1264 OS << ")"; in VisitParenExpr()
1268 OS << UnaryOperator::getOpcodeStr(Node->getOpcode()); in VisitUnaryOperator()
1277 OS << ' '; in VisitUnaryOperator()
1282 OS << ' '; in VisitUnaryOperator()
1289 OS << UnaryOperator::getOpcodeStr(Node->getOpcode()); in VisitUnaryOperator()
1293 OS << "__builtin_offsetof("; in VisitOffsetOfExpr()
1294 Node->getTypeSourceInfo()->getType().print(OS, Policy); in VisitOffsetOfExpr()
1295 OS << ", "; in VisitOffsetOfExpr()
1301 OS << "["; in VisitOffsetOfExpr()
1303 OS << "]"; in VisitOffsetOfExpr()
1318 OS << "."; in VisitOffsetOfExpr()
1321 OS << Id->getName(); in VisitOffsetOfExpr()
1323 OS << ")"; in VisitOffsetOfExpr()
1329 OS << "sizeof"; in VisitUnaryExprOrTypeTraitExpr()
1333 OS << "alignof"; in VisitUnaryExprOrTypeTraitExpr()
1335 OS << "_Alignof"; in VisitUnaryExprOrTypeTraitExpr()
1337 OS << "__alignof"; in VisitUnaryExprOrTypeTraitExpr()
1340 OS << "vec_step"; in VisitUnaryExprOrTypeTraitExpr()
1343 OS << "__builtin_omp_required_simd_align"; in VisitUnaryExprOrTypeTraitExpr()
1347 OS << '('; in VisitUnaryExprOrTypeTraitExpr()
1348 Node->getArgumentType().print(OS, Policy); in VisitUnaryExprOrTypeTraitExpr()
1349 OS << ')'; in VisitUnaryExprOrTypeTraitExpr()
1351 OS << " "; in VisitUnaryExprOrTypeTraitExpr()
1357 OS << "_Generic("; in VisitGenericSelectionExpr()
1360 OS << ", "; in VisitGenericSelectionExpr()
1363 OS << "default"; in VisitGenericSelectionExpr()
1365 T.print(OS, Policy); in VisitGenericSelectionExpr()
1366 OS << ": "; in VisitGenericSelectionExpr()
1369 OS << ")"; in VisitGenericSelectionExpr()
1374 OS << "["; in VisitArraySubscriptExpr()
1376 OS << "]"; in VisitArraySubscriptExpr()
1381 OS << "["; in VisitOMPArraySectionExpr()
1385 OS << ":"; in VisitOMPArraySectionExpr()
1389 OS << "]"; in VisitOMPArraySectionExpr()
1399 if (i) OS << ", "; in PrintCallArgs()
1406 OS << "("; in VisitCallExpr()
1408 OS << ")"; in VisitCallExpr()
1419 OS << (Node->isArrow() ? "->" : "."); in VisitMemberExpr()
1426 Qualifier->print(OS, Policy); in VisitMemberExpr()
1428 OS << "template "; in VisitMemberExpr()
1429 OS << Node->getMemberNameInfo(); in VisitMemberExpr()
1432 OS, Node->getTemplateArgs(), Node->getNumTemplateArgs(), Policy); in VisitMemberExpr()
1436 OS << (Node->isArrow() ? "->isa" : ".isa"); in VisitObjCIsaExpr()
1441 OS << "."; in VisitExtVectorElementExpr()
1442 OS << Node->getAccessor().getName(); in VisitExtVectorElementExpr()
1445 OS << '('; in VisitCStyleCastExpr()
1446 Node->getTypeAsWritten().print(OS, Policy); in VisitCStyleCastExpr()
1447 OS << ')'; in VisitCStyleCastExpr()
1451 OS << '('; in VisitCompoundLiteralExpr()
1452 Node->getType().print(OS, Policy); in VisitCompoundLiteralExpr()
1453 OS << ')'; in VisitCompoundLiteralExpr()
1462 OS << " " << BinaryOperator::getOpcodeStr(Node->getOpcode()) << " "; in VisitBinaryOperator()
1467 OS << " " << BinaryOperator::getOpcodeStr(Node->getOpcode()) << " "; in VisitCompoundAssignOperator()
1472 OS << " ? "; in VisitConditionalOperator()
1474 OS << " : "; in VisitConditionalOperator()
1483 OS << " ?: "; in VisitBinaryConditionalOperator()
1487 OS << "&&" << Node->getLabel()->getName(); in VisitAddrLabelExpr()
1491 OS << "("; in VisitStmtExpr()
1493 OS << ")"; in VisitStmtExpr()
1497 OS << "__builtin_choose_expr("; in VisitChooseExpr()
1499 OS << ", "; in VisitChooseExpr()
1501 OS << ", "; in VisitChooseExpr()
1503 OS << ")"; in VisitChooseExpr()
1507 OS << "__null"; in VisitGNUNullExpr()
1511 OS << "__builtin_shufflevector("; in VisitShuffleVectorExpr()
1513 if (i) OS << ", "; in VisitShuffleVectorExpr()
1516 OS << ")"; in VisitShuffleVectorExpr()
1520 OS << "__builtin_convertvector("; in VisitConvertVectorExpr()
1522 OS << ", "; in VisitConvertVectorExpr()
1523 Node->getType().print(OS, Policy); in VisitConvertVectorExpr()
1524 OS << ")"; in VisitConvertVectorExpr()
1533 OS << "{"; in VisitInitListExpr()
1535 if (i) OS << ", "; in VisitInitListExpr()
1539 OS << "{}"; in VisitInitListExpr()
1541 OS << "}"; in VisitInitListExpr()
1545 OS << "("; in VisitParenListExpr()
1547 if (i) OS << ", "; in VisitParenListExpr()
1550 OS << ")"; in VisitParenListExpr()
1561 OS << II->getName() << ":"; in VisitDesignatedInitExpr()
1565 OS << "." << D->getFieldName()->getName(); in VisitDesignatedInitExpr()
1568 OS << "["; in VisitDesignatedInitExpr()
1573 OS << " ... "; in VisitDesignatedInitExpr()
1576 OS << "]"; in VisitDesignatedInitExpr()
1581 OS << " = "; in VisitDesignatedInitExpr()
1583 OS << " "; in VisitDesignatedInitExpr()
1589 OS << "{"; in VisitDesignatedInitUpdateExpr()
1590 OS << "/*base*/"; in VisitDesignatedInitUpdateExpr()
1592 OS << ", "; in VisitDesignatedInitUpdateExpr()
1594 OS << "/*updater*/"; in VisitDesignatedInitUpdateExpr()
1596 OS << "}"; in VisitDesignatedInitUpdateExpr()
1600 OS << "/*no init*/"; in VisitNoInitExpr()
1605 OS << "/*implicit*/"; in VisitImplicitValueInitExpr()
1606 Node->getType().print(OS, Policy); in VisitImplicitValueInitExpr()
1607 OS << "()"; in VisitImplicitValueInitExpr()
1609 OS << "/*implicit*/("; in VisitImplicitValueInitExpr()
1610 Node->getType().print(OS, Policy); in VisitImplicitValueInitExpr()
1611 OS << ')'; in VisitImplicitValueInitExpr()
1613 OS << "{}"; in VisitImplicitValueInitExpr()
1615 OS << 0; in VisitImplicitValueInitExpr()
1620 OS << "__builtin_va_arg("; in VisitVAArgExpr()
1622 OS << ", "; in VisitVAArgExpr()
1623 Node->getType().print(OS, Policy); in VisitVAArgExpr()
1624 OS << ")"; in VisitVAArgExpr()
1641 OS << Name; in VisitAtomicExpr()
1647 OS << ", "; in VisitAtomicExpr()
1652 OS << ", "; in VisitAtomicExpr()
1657 OS << ", "; in VisitAtomicExpr()
1661 OS << ", "; in VisitAtomicExpr()
1665 OS << ", "; in VisitAtomicExpr()
1668 OS << ")"; in VisitAtomicExpr()
1683 OS << OpStrings[Kind] << ' '; in VisitCXXOperatorCallExpr()
1687 OS << ' ' << OpStrings[Kind]; in VisitCXXOperatorCallExpr()
1693 OS << '('; in VisitCXXOperatorCallExpr()
1696 OS << ", "; in VisitCXXOperatorCallExpr()
1700 OS << ')'; in VisitCXXOperatorCallExpr()
1703 OS << '['; in VisitCXXOperatorCallExpr()
1705 OS << ']'; in VisitCXXOperatorCallExpr()
1707 OS << OpStrings[Kind] << ' '; in VisitCXXOperatorCallExpr()
1711 OS << ' ' << OpStrings[Kind] << ' '; in VisitCXXOperatorCallExpr()
1730 OS << "<<<"; in VisitCUDAKernelCallExpr()
1732 OS << ">>>("; in VisitCUDAKernelCallExpr()
1734 OS << ")"; in VisitCUDAKernelCallExpr()
1738 OS << Node->getCastName() << '<'; in VisitCXXNamedCastExpr()
1739 Node->getTypeAsWritten().print(OS, Policy); in VisitCXXNamedCastExpr()
1740 OS << ">("; in VisitCXXNamedCastExpr()
1742 OS << ")"; in VisitCXXNamedCastExpr()
1762 OS << "typeid("; in VisitCXXTypeidExpr()
1764 Node->getTypeOperandSourceInfo()->getType().print(OS, Policy); in VisitCXXTypeidExpr()
1768 OS << ")"; in VisitCXXTypeidExpr()
1772 OS << "__uuidof("; in VisitCXXUuidofExpr()
1774 Node->getTypeOperandSourceInfo()->getType().print(OS, Policy); in VisitCXXUuidofExpr()
1778 OS << ")"; in VisitCXXUuidofExpr()
1784 OS << "->"; in VisitMSPropertyRefExpr()
1786 OS << "."; in VisitMSPropertyRefExpr()
1789 Qualifier->print(OS, Policy); in VisitMSPropertyRefExpr()
1790 OS << Node->getPropertyDecl()->getDeclName(); in VisitMSPropertyRefExpr()
1795 OS << "["; in VisitMSPropertySubscriptExpr()
1797 OS << "]"; in VisitMSPropertySubscriptExpr()
1803 OS << cast<StringLiteral>(Node->getArg(0)->IgnoreImpCasts())->getString(); in VisitUserDefinedLiteral()
1812 OS << "operator\"\"" << Node->getUDSuffix()->getName(); in VisitUserDefinedLiteral()
1814 OS, Args->data(), Args->size(), Policy); in VisitUserDefinedLiteral()
1815 OS << "()"; in VisitUserDefinedLiteral()
1822 OS << C; in VisitUserDefinedLiteral()
1829 OS << Int->getValue().toString(10, /*isSigned*/false); in VisitUserDefinedLiteral()
1835 PrintFloatingLiteral(OS, Float, /*PrintSuffix=*/false); in VisitUserDefinedLiteral()
1843 OS << Node->getUDSuffix()->getName(); in VisitUserDefinedLiteral()
1847 OS << (Node->getValue() ? "true" : "false"); in VisitCXXBoolLiteralExpr()
1851 OS << "nullptr"; in VisitCXXNullPtrLiteralExpr()
1855 OS << "this"; in VisitCXXThisExpr()
1860 OS << "throw"; in VisitCXXThrowExpr()
1862 OS << "throw "; in VisitCXXThrowExpr()
1876 Node->getType().print(OS, Policy); in VisitCXXFunctionalCastExpr()
1880 OS << "("; in VisitCXXFunctionalCastExpr()
1883 OS << ")"; in VisitCXXFunctionalCastExpr()
1891 Node->getType().print(OS, Policy); in VisitCXXTemporaryObjectExpr()
1895 OS << "{"; in VisitCXXTemporaryObjectExpr()
1897 OS << "("; in VisitCXXTemporaryObjectExpr()
1904 OS << ", "; in VisitCXXTemporaryObjectExpr()
1910 OS << "}"; in VisitCXXTemporaryObjectExpr()
1912 OS << ")"; in VisitCXXTemporaryObjectExpr()
1916 OS << '['; in VisitLambdaExpr()
1923 OS << '='; in VisitLambdaExpr()
1928 OS << '&'; in VisitLambdaExpr()
1937 OS << ", "; in VisitLambdaExpr()
1942 OS << "this"; in VisitLambdaExpr()
1947 OS << '&'; in VisitLambdaExpr()
1948 OS << C->getCapturedVar()->getName(); in VisitLambdaExpr()
1952 OS << C->getCapturedVar()->getName(); in VisitLambdaExpr()
1961 OS << ']'; in VisitLambdaExpr()
1964 OS << " ("; in VisitLambdaExpr()
1969 OS << ", "; in VisitLambdaExpr()
1974 P->getOriginalType().print(OS, Policy, ParamStr); in VisitLambdaExpr()
1978 OS << ", "; in VisitLambdaExpr()
1979 OS << "..."; in VisitLambdaExpr()
1981 OS << ')'; in VisitLambdaExpr()
1984 OS << " mutable"; in VisitLambdaExpr()
1988 Proto->printExceptionSpecification(OS, Policy); in VisitLambdaExpr()
1994 OS << " -> "; in VisitLambdaExpr()
1995 Proto->getReturnType().print(OS, Policy); in VisitLambdaExpr()
2001 OS << ' '; in VisitLambdaExpr()
2007 TSInfo->getType().print(OS, Policy); in VisitCXXScalarValueInitExpr()
2009 Node->getType().print(OS, Policy); in VisitCXXScalarValueInitExpr()
2010 OS << "()"; in VisitCXXScalarValueInitExpr()
2015 OS << "::"; in VisitCXXNewExpr()
2016 OS << "new "; in VisitCXXNewExpr()
2019 OS << "("; in VisitCXXNewExpr()
2024 OS << ", "; in VisitCXXNewExpr()
2027 OS << ") "; in VisitCXXNewExpr()
2030 OS << "("; in VisitCXXNewExpr()
2038 E->getAllocatedType().print(OS, Policy, TypeS); in VisitCXXNewExpr()
2040 OS << ")"; in VisitCXXNewExpr()
2045 OS << "("; in VisitCXXNewExpr()
2048 OS << ")"; in VisitCXXNewExpr()
2054 OS << "::"; in VisitCXXDeleteExpr()
2055 OS << "delete "; in VisitCXXDeleteExpr()
2057 OS << "[] "; in VisitCXXDeleteExpr()
2064 OS << "->"; in VisitCXXPseudoDestructorExpr()
2066 OS << '.'; in VisitCXXPseudoDestructorExpr()
2068 E->getQualifier()->print(OS, Policy); in VisitCXXPseudoDestructorExpr()
2069 OS << "~"; in VisitCXXPseudoDestructorExpr()
2072 OS << II->getName(); in VisitCXXPseudoDestructorExpr()
2074 E->getDestroyedType().print(OS, Policy); in VisitCXXPseudoDestructorExpr()
2079 OS << "{"; in VisitCXXConstructExpr()
2087 if (i) OS << ", "; in VisitCXXConstructExpr()
2092 OS << "}"; in VisitCXXConstructExpr()
2107 Node->getTypeAsWritten().print(OS, Policy); in VisitCXXUnresolvedConstructExpr()
2108 OS << "("; in VisitCXXUnresolvedConstructExpr()
2113 OS << ", "; in VisitCXXUnresolvedConstructExpr()
2116 OS << ")"; in VisitCXXUnresolvedConstructExpr()
2123 OS << (Node->isArrow() ? "->" : "."); in VisitCXXDependentScopeMemberExpr()
2126 Qualifier->print(OS, Policy); in VisitCXXDependentScopeMemberExpr()
2128 OS << "template "; in VisitCXXDependentScopeMemberExpr()
2129 OS << Node->getMemberNameInfo(); in VisitCXXDependentScopeMemberExpr()
2132 OS, Node->getTemplateArgs(), Node->getNumTemplateArgs(), Policy); in VisitCXXDependentScopeMemberExpr()
2138 OS << (Node->isArrow() ? "->" : "."); in VisitUnresolvedMemberExpr()
2141 Qualifier->print(OS, Policy); in VisitUnresolvedMemberExpr()
2143 OS << "template "; in VisitUnresolvedMemberExpr()
2144 OS << Node->getMemberNameInfo(); in VisitUnresolvedMemberExpr()
2147 OS, Node->getTemplateArgs(), Node->getNumTemplateArgs(), Policy); in VisitUnresolvedMemberExpr()
2180 OS << getTypeTraitName(E->getTrait()) << "("; in VisitTypeTraitExpr()
2183 OS << ", "; in VisitTypeTraitExpr()
2184 E->getArg(I)->getType().print(OS, Policy); in VisitTypeTraitExpr()
2186 OS << ")"; in VisitTypeTraitExpr()
2190 OS << getTypeTraitName(E->getTrait()) << '('; in VisitArrayTypeTraitExpr()
2191 E->getQueriedType().print(OS, Policy); in VisitArrayTypeTraitExpr()
2192 OS << ')'; in VisitArrayTypeTraitExpr()
2196 OS << getExpressionTraitName(E->getTrait()) << '('; in VisitExpressionTraitExpr()
2198 OS << ')'; in VisitExpressionTraitExpr()
2202 OS << "noexcept("; in VisitCXXNoexceptExpr()
2204 OS << ")"; in VisitCXXNoexceptExpr()
2209 OS << "..."; in VisitPackExpansionExpr()
2213 OS << "sizeof...(" << *E->getPack() << ")"; in VisitSizeOfPackExpr()
2218 OS << *Node->getParameterPack(); in VisitSubstNonTypeTemplateParmPackExpr()
2227 OS << *E->getParameterPack(); in VisitFunctionParmPackExpr()
2235 OS << "("; in VisitCXXFoldExpr()
2238 OS << " " << BinaryOperator::getOpcodeStr(E->getOperator()) << " "; in VisitCXXFoldExpr()
2240 OS << "..."; in VisitCXXFoldExpr()
2242 OS << " " << BinaryOperator::getOpcodeStr(E->getOperator()) << " "; in VisitCXXFoldExpr()
2245 OS << ")"; in VisitCXXFoldExpr()
2255 OS << "co_return"; in VisitCoreturnStmt()
2257 OS << " "; in VisitCoreturnStmt()
2260 OS << ";"; in VisitCoreturnStmt()
2264 OS << "co_await "; in VisitCoawaitExpr()
2269 OS << "co_yield "; in VisitCoyieldExpr()
2276 OS << "@"; in VisitObjCStringLiteral()
2281 OS << "@"; in VisitObjCBoxedExpr()
2286 OS << "@[ "; in VisitObjCArrayLiteral()
2290 OS << ", "; in VisitObjCArrayLiteral()
2293 OS << " ]"; in VisitObjCArrayLiteral()
2297 OS << "@{ "; in VisitObjCDictionaryLiteral()
2300 OS << ", "; in VisitObjCDictionaryLiteral()
2304 OS << " : "; in VisitObjCDictionaryLiteral()
2307 OS << "..."; in VisitObjCDictionaryLiteral()
2309 OS << " }"; in VisitObjCDictionaryLiteral()
2313 OS << "@encode("; in VisitObjCEncodeExpr()
2314 Node->getEncodedType().print(OS, Policy); in VisitObjCEncodeExpr()
2315 OS << ')'; in VisitObjCEncodeExpr()
2319 OS << "@selector("; in VisitObjCSelectorExpr()
2320 Node->getSelector().print(OS); in VisitObjCSelectorExpr()
2321 OS << ')'; in VisitObjCSelectorExpr()
2325 OS << "@protocol(" << *Node->getProtocol() << ')'; in VisitObjCProtocolExpr()
2329 OS << "["; in VisitObjCMessageExpr()
2336 Mess->getClassReceiver().print(OS, Policy); in VisitObjCMessageExpr()
2341 OS << "Super"; in VisitObjCMessageExpr()
2345 OS << ' '; in VisitObjCMessageExpr()
2348 OS << selector.getNameForSlot(0); in VisitObjCMessageExpr()
2352 if (i > 0) OS << ' '; in VisitObjCMessageExpr()
2354 OS << selector.getIdentifierInfoForSlot(i)->getName() << ':'; in VisitObjCMessageExpr()
2356 OS << ":"; in VisitObjCMessageExpr()
2358 else OS << ", "; // Handle variadic methods. in VisitObjCMessageExpr()
2363 OS << "]"; in VisitObjCMessageExpr()
2367 OS << (Node->getValue() ? "__objc_yes" : "__objc_no"); in VisitObjCBoolLiteralExpr()
2377 OS << '(' << E->getBridgeKindName(); in VisitObjCBridgedCastExpr()
2378 E->getType().print(OS, Policy); in VisitObjCBridgedCastExpr()
2379 OS << ')'; in VisitObjCBridgedCastExpr()
2385 OS << "^"; in VisitBlockExpr()
2390 OS << "()"; in VisitBlockExpr()
2392 OS << '('; in VisitBlockExpr()
2395 if (AI != BD->param_begin()) OS << ", "; in VisitBlockExpr()
2397 (*AI)->getType().print(OS, Policy, ParamStr); in VisitBlockExpr()
2402 if (!BD->param_empty()) OS << ", "; in VisitBlockExpr()
2403 OS << "..."; in VisitBlockExpr()
2405 OS << ')'; in VisitBlockExpr()
2407 OS << "{ }"; in VisitBlockExpr()
2420 OS << "__builtin_astype("; in VisitAsTypeExpr()
2422 OS << ", "; in VisitAsTypeExpr()
2423 Node->getType().print(OS, Policy); in VisitAsTypeExpr()
2424 OS << ")"; in VisitAsTypeExpr()
2435 void Stmt::printPretty(raw_ostream &OS, in printPretty() argument
2439 StmtPrinter P(OS, Helper, Policy, Indentation); in printPretty()