Lines Matching refs:OS
37 raw_ostream &OS; member in __anon451ea2a80111::StmtPrinter
46 : OS(os), IndentLevel(Indentation), Helper(helper), Policy(Policy) {} in StmtPrinter()
58 OS << ";\n"; in PrintStmt()
81 OS << "<null expr>"; in PrintExpr()
86 OS << " "; in Indent()
87 return OS; in Indent()
91 if (Helper && Helper->handledStmt(S,OS)) in Visit()
100 OS << "<<unknown expr type>>"; in VisitExpr()
118 OS << "{\n"; in PrintRawCompoundStmt()
126 D->print(OS, Policy, IndentLevel); in PrintRawDecl()
131 Decl::printGroup(Decls.data(), Decls.size(), OS, Policy, IndentLevel); in PrintRawDeclStmt()
141 OS << ";\n"; in VisitDeclStmt()
147 OS << "\n"; in VisitCompoundStmt()
154 OS << " ... "; in VisitCaseStmt()
157 OS << ":\n"; in VisitCaseStmt()
174 Attr->printPretty(OS, Policy); in VisitAttributedStmt()
181 OS << "if ("; in PrintRawIfStmt()
186 OS << ')'; in PrintRawIfStmt()
189 OS << ' '; in PrintRawIfStmt()
191 OS << (If->getElse() ? ' ' : '\n'); in PrintRawIfStmt()
193 OS << '\n'; in PrintRawIfStmt()
199 OS << "else"; in PrintRawIfStmt()
202 OS << ' '; in PrintRawIfStmt()
204 OS << '\n'; in PrintRawIfStmt()
206 OS << ' '; in PrintRawIfStmt()
209 OS << '\n'; in PrintRawIfStmt()
226 OS << ")"; in VisitSwitchStmt()
230 OS << " "; in VisitSwitchStmt()
232 OS << "\n"; in VisitSwitchStmt()
234 OS << "\n"; in VisitSwitchStmt()
245 OS << ")\n"; in VisitWhileStmt()
253 OS << " "; in VisitDoStmt()
255 OS << "\n"; in VisitDoStmt()
260 OS << "while ("; in VisitDoStmt()
262 OS << ");\n"; in VisitDoStmt()
273 OS << ";"; in VisitForStmt()
275 OS << " "; in VisitForStmt()
278 OS << ";"; in VisitForStmt()
280 OS << " "; in VisitForStmt()
283 OS << ") "; in VisitForStmt()
287 OS << "\n"; in VisitForStmt()
289 OS << "\n"; in VisitForStmt()
300 OS << " in "; in VisitObjCForCollectionStmt()
302 OS << ") "; in VisitObjCForCollectionStmt()
306 OS << "\n"; in VisitObjCForCollectionStmt()
308 OS << "\n"; in VisitObjCForCollectionStmt()
317 Node->getLoopVariable()->print(OS, SubPolicy, IndentLevel); in VisitCXXForRangeStmt()
318 OS << " : "; in VisitCXXForRangeStmt()
320 OS << ") {\n"; in VisitCXXForRangeStmt()
323 if (Policy.IncludeNewlines) OS << "\n"; in VisitCXXForRangeStmt()
329 OS << "__if_exists ("; in VisitMSDependentExistsStmt()
331 OS << "__if_not_exists ("; in VisitMSDependentExistsStmt()
335 Qualifier->print(OS, Policy); in VisitMSDependentExistsStmt()
337 OS << Node->getNameInfo() << ") "; in VisitMSDependentExistsStmt()
344 if (Policy.IncludeNewlines) OS << "\n"; in VisitGotoStmt()
350 OS << ";"; in VisitIndirectGotoStmt()
351 if (Policy.IncludeNewlines) OS << "\n"; in VisitIndirectGotoStmt()
356 if (Policy.IncludeNewlines) OS << "\n"; in VisitContinueStmt()
361 if (Policy.IncludeNewlines) OS << "\n"; in VisitBreakStmt()
368 OS << " "; in VisitReturnStmt()
371 OS << ";"; in VisitReturnStmt()
372 if (Policy.IncludeNewlines) OS << "\n"; in VisitReturnStmt()
380 OS << "volatile "; in VisitGCCAsmStmt()
382 OS << "("; in VisitGCCAsmStmt()
388 OS << " : "; in VisitGCCAsmStmt()
392 OS << ", "; in VisitGCCAsmStmt()
395 OS << '['; in VisitGCCAsmStmt()
396 OS << Node->getOutputName(i); in VisitGCCAsmStmt()
397 OS << "] "; in VisitGCCAsmStmt()
401 OS << " ("; in VisitGCCAsmStmt()
403 OS << ")"; in VisitGCCAsmStmt()
408 OS << " : "; in VisitGCCAsmStmt()
412 OS << ", "; in VisitGCCAsmStmt()
415 OS << '['; in VisitGCCAsmStmt()
416 OS << Node->getInputName(i); in VisitGCCAsmStmt()
417 OS << "] "; in VisitGCCAsmStmt()
421 OS << " ("; in VisitGCCAsmStmt()
423 OS << ")"; in VisitGCCAsmStmt()
428 OS << " : "; in VisitGCCAsmStmt()
432 OS << ", "; in VisitGCCAsmStmt()
437 OS << ");"; in VisitGCCAsmStmt()
438 if (Policy.IncludeNewlines) OS << "\n"; in VisitGCCAsmStmt()
445 OS << "{\n"; in VisitMSAsmStmt()
446 OS << Node->getAsmString() << "\n"; in VisitMSAsmStmt()
459 OS << "\n"; in VisitObjCAtTryStmt()
469 OS << ")"; in VisitObjCAtTryStmt()
472 OS << "\n"; in VisitObjCAtTryStmt()
480 OS << "\n"; in VisitObjCAtTryStmt()
494 OS << " "; in VisitObjCAtThrowStmt()
497 OS << ";\n"; in VisitObjCAtThrowStmt()
503 OS << ")"; in VisitObjCAtSynchronizedStmt()
505 OS << "\n"; in VisitObjCAtSynchronizedStmt()
511 OS << "\n"; in VisitObjCAutoreleasePoolStmt()
515 OS << "catch ("; in PrintRawCXXCatchStmt()
519 OS << "..."; in PrintRawCXXCatchStmt()
520 OS << ") "; in PrintRawCXXCatchStmt()
527 OS << "\n"; in VisitCXXCatchStmt()
534 OS << " "; in VisitCXXTryStmt()
537 OS << "\n"; in VisitCXXTryStmt()
551 OS << "\n"; in VisitSEHTryStmt()
555 OS << "__finally "; in PrintRawSEHFinallyStmt()
557 OS << "\n"; in PrintRawSEHFinallyStmt()
561 OS << "__except ("; in PrintRawSEHExceptHandler()
563 OS << ")\n"; in PrintRawSEHExceptHandler()
565 OS << "\n"; in PrintRawSEHExceptHandler()
571 OS << "\n"; in VisitSEHExceptStmt()
577 OS << "\n"; in VisitSEHFinallyStmt()
582 if (Policy.IncludeNewlines) OS << "\n"; in VisitSEHLeaveStmt()
591 raw_ostream &OS; member in __anon451ea2a80211::OMPClausePrinter
597 OMPClausePrinter(raw_ostream &OS, const PrintingPolicy &Policy) in OMPClausePrinter() argument
598 : OS(OS), Policy(Policy) { } in OMPClausePrinter()
605 OS << "if("; in VisitOMPIfClause()
607 OS << getOpenMPDirectiveName(Node->getNameModifier()) << ": "; in VisitOMPIfClause()
608 Node->getCondition()->printPretty(OS, nullptr, Policy, 0); in VisitOMPIfClause()
609 OS << ")"; in VisitOMPIfClause()
613 OS << "final("; in VisitOMPFinalClause()
614 Node->getCondition()->printPretty(OS, nullptr, Policy, 0); in VisitOMPFinalClause()
615 OS << ")"; in VisitOMPFinalClause()
619 OS << "num_threads("; in VisitOMPNumThreadsClause()
620 Node->getNumThreads()->printPretty(OS, nullptr, Policy, 0); in VisitOMPNumThreadsClause()
621 OS << ")"; in VisitOMPNumThreadsClause()
625 OS << "safelen("; in VisitOMPSafelenClause()
626 Node->getSafelen()->printPretty(OS, nullptr, Policy, 0); in VisitOMPSafelenClause()
627 OS << ")"; in VisitOMPSafelenClause()
631 OS << "simdlen("; in VisitOMPSimdlenClause()
632 Node->getSimdlen()->printPretty(OS, nullptr, Policy, 0); in VisitOMPSimdlenClause()
633 OS << ")"; in VisitOMPSimdlenClause()
637 OS << "collapse("; in VisitOMPCollapseClause()
638 Node->getNumForLoops()->printPretty(OS, nullptr, Policy, 0); in VisitOMPCollapseClause()
639 OS << ")"; in VisitOMPCollapseClause()
643 OS << "default(" in VisitOMPDefaultClause()
649 OS << "proc_bind(" in VisitOMPProcBindClause()
655 OS << "schedule("; in VisitOMPScheduleClause()
657 OS << getOpenMPSimpleClauseTypeName(OMPC_schedule, in VisitOMPScheduleClause()
660 OS << ", "; in VisitOMPScheduleClause()
661 OS << getOpenMPSimpleClauseTypeName(OMPC_schedule, in VisitOMPScheduleClause()
664 OS << ": "; in VisitOMPScheduleClause()
666 OS << getOpenMPSimpleClauseTypeName(OMPC_schedule, Node->getScheduleKind()); in VisitOMPScheduleClause()
668 OS << ", "; in VisitOMPScheduleClause()
669 E->printPretty(OS, nullptr, Policy); in VisitOMPScheduleClause()
671 OS << ")"; in VisitOMPScheduleClause()
675 OS << "ordered"; in VisitOMPOrderedClause()
677 OS << "("; in VisitOMPOrderedClause()
678 Num->printPretty(OS, nullptr, Policy, 0); in VisitOMPOrderedClause()
679 OS << ")"; in VisitOMPOrderedClause()
684 OS << "nowait"; in VisitOMPNowaitClause()
688 OS << "untied"; in VisitOMPUntiedClause()
692 OS << "nogroup"; in VisitOMPNogroupClause()
696 OS << "mergeable"; in VisitOMPMergeableClause()
699 void OMPClausePrinter::VisitOMPReadClause(OMPReadClause *) { OS << "read"; } in VisitOMPReadClause()
701 void OMPClausePrinter::VisitOMPWriteClause(OMPWriteClause *) { OS << "write"; } in VisitOMPWriteClause()
704 OS << "update"; in VisitOMPUpdateClause()
708 OS << "capture"; in VisitOMPCaptureClause()
712 OS << "seq_cst"; in VisitOMPSeqCstClause()
716 OS << "threads"; in VisitOMPThreadsClause()
719 void OMPClausePrinter::VisitOMPSIMDClause(OMPSIMDClause *) { OS << "simd"; } in VisitOMPSIMDClause()
722 OS << "device("; in VisitOMPDeviceClause()
723 Node->getDevice()->printPretty(OS, nullptr, Policy, 0); in VisitOMPDeviceClause()
724 OS << ")"; in VisitOMPDeviceClause()
728 OS << "num_teams("; in VisitOMPNumTeamsClause()
729 Node->getNumTeams()->printPretty(OS, nullptr, Policy, 0); in VisitOMPNumTeamsClause()
730 OS << ")"; in VisitOMPNumTeamsClause()
734 OS << "thread_limit("; in VisitOMPThreadLimitClause()
735 Node->getThreadLimit()->printPretty(OS, nullptr, Policy, 0); in VisitOMPThreadLimitClause()
736 OS << ")"; in VisitOMPThreadLimitClause()
740 OS << "priority("; in VisitOMPPriorityClause()
741 Node->getPriority()->printPretty(OS, nullptr, Policy, 0); in VisitOMPPriorityClause()
742 OS << ")"; in VisitOMPPriorityClause()
746 OS << "grainsize("; in VisitOMPGrainsizeClause()
747 Node->getGrainsize()->printPretty(OS, nullptr, Policy, 0); in VisitOMPGrainsizeClause()
748 OS << ")"; in VisitOMPGrainsizeClause()
752 OS << "num_tasks("; in VisitOMPNumTasksClause()
753 Node->getNumTasks()->printPretty(OS, nullptr, Policy, 0); in VisitOMPNumTasksClause()
754 OS << ")"; in VisitOMPNumTasksClause()
758 OS << "hint("; in VisitOMPHintClause()
759 Node->getHint()->printPretty(OS, nullptr, Policy, 0); in VisitOMPHintClause()
760 OS << ")"; in VisitOMPHintClause()
769 OS << (I == Node->varlist_begin() ? StartSym : ','); in VisitOMPClauseList()
772 DRE->printPretty(OS, nullptr, Policy, 0); in VisitOMPClauseList()
774 DRE->getDecl()->printQualifiedName(OS); in VisitOMPClauseList()
776 (*I)->printPretty(OS, nullptr, Policy, 0); in VisitOMPClauseList()
782 OS << "private"; in VisitOMPPrivateClause()
784 OS << ")"; in VisitOMPPrivateClause()
790 OS << "firstprivate"; in VisitOMPFirstprivateClause()
792 OS << ")"; in VisitOMPFirstprivateClause()
798 OS << "lastprivate"; in VisitOMPLastprivateClause()
800 OS << ")"; in VisitOMPLastprivateClause()
806 OS << "shared"; in VisitOMPSharedClause()
808 OS << ")"; in VisitOMPSharedClause()
814 OS << "reduction("; in VisitOMPReductionClause()
821 OS << getOperatorSpelling(OOK); in VisitOMPReductionClause()
825 QualifierLoc->print(OS, Policy); in VisitOMPReductionClause()
826 OS << Node->getNameInfo(); in VisitOMPReductionClause()
828 OS << ":"; in VisitOMPReductionClause()
830 OS << ")"; in VisitOMPReductionClause()
836 OS << "linear"; in VisitOMPLinearClause()
838 OS << '(' in VisitOMPLinearClause()
843 OS << ')'; in VisitOMPLinearClause()
845 OS << ": "; in VisitOMPLinearClause()
846 Node->getStep()->printPretty(OS, nullptr, Policy, 0); in VisitOMPLinearClause()
848 OS << ")"; in VisitOMPLinearClause()
854 OS << "aligned"; in VisitOMPAlignedClause()
857 OS << ": "; in VisitOMPAlignedClause()
858 Node->getAlignment()->printPretty(OS, nullptr, Policy, 0); in VisitOMPAlignedClause()
860 OS << ")"; in VisitOMPAlignedClause()
866 OS << "copyin"; in VisitOMPCopyinClause()
868 OS << ")"; in VisitOMPCopyinClause()
874 OS << "copyprivate"; in VisitOMPCopyprivateClause()
876 OS << ")"; in VisitOMPCopyprivateClause()
883 OS << ")"; in VisitOMPFlushClause()
888 OS << "depend("; in VisitOMPDependClause()
889 OS << getOpenMPSimpleClauseTypeName(Node->getClauseKind(), in VisitOMPDependClause()
892 OS << " :"; in VisitOMPDependClause()
895 OS << ")"; in VisitOMPDependClause()
900 OS << "map("; in VisitOMPMapClause()
903 OS << getOpenMPSimpleClauseTypeName(OMPC_map, in VisitOMPMapClause()
905 OS << ','; in VisitOMPMapClause()
907 OS << getOpenMPSimpleClauseTypeName(OMPC_map, Node->getMapType()); in VisitOMPMapClause()
908 OS << ':'; in VisitOMPMapClause()
911 OS << ")"; in VisitOMPMapClause()
917 OS << "to"; in VisitOMPToClause()
919 OS << ")"; in VisitOMPToClause()
925 OS << "from"; in VisitOMPFromClause()
927 OS << ")"; in VisitOMPFromClause()
932 OS << "dist_schedule(" << getOpenMPSimpleClauseTypeName( in VisitOMPDistScheduleClause()
935 OS << ", "; in VisitOMPDistScheduleClause()
936 E->printPretty(OS, nullptr, Policy); in VisitOMPDistScheduleClause()
938 OS << ")"; in VisitOMPDistScheduleClause()
942 OS << "defaultmap("; in VisitOMPDefaultmapClause()
943 OS << getOpenMPSimpleClauseTypeName(OMPC_defaultmap, in VisitOMPDefaultmapClause()
945 OS << ": "; in VisitOMPDefaultmapClause()
946 OS << getOpenMPSimpleClauseTypeName(OMPC_defaultmap, in VisitOMPDefaultmapClause()
948 OS << ")"; in VisitOMPDefaultmapClause()
953 OS << "use_device_ptr"; in VisitOMPUseDevicePtrClause()
955 OS << ")"; in VisitOMPUseDevicePtrClause()
961 OS << "is_device_ptr"; in VisitOMPIsDevicePtrClause()
963 OS << ")"; in VisitOMPIsDevicePtrClause()
973 OMPClausePrinter Printer(OS, Policy); in PrintOMPExecutableDirective()
979 OS << ' '; in PrintOMPExecutableDirective()
981 OS << "\n"; in PrintOMPExecutableDirective()
1033 OS << " ("; in VisitOMPCriticalDirective()
1034 Node->getDirectiveName().printName(OS); in VisitOMPCriticalDirective()
1035 OS << ")"; in VisitOMPCriticalDirective()
1037 OS << " "; in VisitOMPCriticalDirective()
1202 OCED->getInit()->IgnoreImpCasts()->printPretty(OS, nullptr, Policy); in VisitDeclRefExpr()
1206 Qualifier->print(OS, Policy); in VisitDeclRefExpr()
1208 OS << "template "; in VisitDeclRefExpr()
1209 OS << Node->getNameInfo(); in VisitDeclRefExpr()
1212 OS, Node->template_arguments(), Policy); in VisitDeclRefExpr()
1218 Qualifier->print(OS, Policy); in VisitDependentScopeDeclRefExpr()
1220 OS << "template "; in VisitDependentScopeDeclRefExpr()
1221 OS << Node->getNameInfo(); in VisitDependentScopeDeclRefExpr()
1224 OS, Node->template_arguments(), Policy); in VisitDependentScopeDeclRefExpr()
1229 Node->getQualifier()->print(OS, Policy); in VisitUnresolvedLookupExpr()
1231 OS << "template "; in VisitUnresolvedLookupExpr()
1232 OS << Node->getNameInfo(); in VisitUnresolvedLookupExpr()
1235 OS, Node->template_arguments(), Policy); in VisitUnresolvedLookupExpr()
1241 OS << (Node->isArrow() ? "->" : "."); in VisitObjCIvarRefExpr()
1243 OS << *Node->getDecl(); in VisitObjCIvarRefExpr()
1248 OS << "super."; in VisitObjCPropertyRefExpr()
1251 OS << "."; in VisitObjCPropertyRefExpr()
1253 OS << Node->getClassReceiver()->getName() << "."; in VisitObjCPropertyRefExpr()
1257 Node->getImplicitPropertyGetter()->getSelector().print(OS); in VisitObjCPropertyRefExpr()
1259 OS << Node->getExplicitProperty()->getName(); in VisitObjCPropertyRefExpr()
1265 OS << "["; in VisitObjCSubscriptRefExpr()
1267 OS << "]"; in VisitObjCSubscriptRefExpr()
1271 OS << PredefinedExpr::getIdentTypeName(Node->getIdentType()); in VisitPredefinedExpr()
1279 case CharacterLiteral::Wide: OS << 'L'; break; in VisitCharacterLiteral()
1280 case CharacterLiteral::UTF8: OS << "u8"; break; in VisitCharacterLiteral()
1281 case CharacterLiteral::UTF16: OS << 'u'; break; in VisitCharacterLiteral()
1282 case CharacterLiteral::UTF32: OS << 'U'; break; in VisitCharacterLiteral()
1287 OS << "'\\\\'"; in VisitCharacterLiteral()
1290 OS << "'\\''"; in VisitCharacterLiteral()
1294 OS << "'\\a'"; in VisitCharacterLiteral()
1297 OS << "'\\b'"; in VisitCharacterLiteral()
1304 OS << "'\\f'"; in VisitCharacterLiteral()
1307 OS << "'\\n'"; in VisitCharacterLiteral()
1310 OS << "'\\r'"; in VisitCharacterLiteral()
1313 OS << "'\\t'"; in VisitCharacterLiteral()
1316 OS << "'\\v'"; in VisitCharacterLiteral()
1326 OS << "'" << (char)value << "'"; in VisitCharacterLiteral()
1328 OS << "'\\x" << llvm::format("%02x", value) << "'"; in VisitCharacterLiteral()
1330 OS << "'\\u" << llvm::format("%04x", value) << "'"; in VisitCharacterLiteral()
1332 OS << "'\\U" << llvm::format("%08x", value) << "'"; in VisitCharacterLiteral()
1338 OS << Node->getValue().toString(10, isSigned); in VisitIntegerLiteral()
1344 case BuiltinType::Char_U: OS << "i8"; break; in VisitIntegerLiteral()
1345 case BuiltinType::UChar: OS << "Ui8"; break; in VisitIntegerLiteral()
1346 case BuiltinType::Short: OS << "i16"; break; in VisitIntegerLiteral()
1347 case BuiltinType::UShort: OS << "Ui16"; break; in VisitIntegerLiteral()
1349 case BuiltinType::UInt: OS << 'U'; break; in VisitIntegerLiteral()
1350 case BuiltinType::Long: OS << 'L'; break; in VisitIntegerLiteral()
1351 case BuiltinType::ULong: OS << "UL"; break; in VisitIntegerLiteral()
1352 case BuiltinType::LongLong: OS << "LL"; break; in VisitIntegerLiteral()
1353 case BuiltinType::ULongLong: OS << "ULL"; break; in VisitIntegerLiteral()
1357 static void PrintFloatingLiteral(raw_ostream &OS, FloatingLiteral *Node, in PrintFloatingLiteral() argument
1361 OS << Str; in PrintFloatingLiteral()
1363 OS << '.'; // Trailing dot in order to separate from ints. in PrintFloatingLiteral()
1373 case BuiltinType::Float: OS << 'F'; break; in PrintFloatingLiteral()
1374 case BuiltinType::LongDouble: OS << 'L'; break; in PrintFloatingLiteral()
1375 case BuiltinType::Float128: OS << 'Q'; break; in PrintFloatingLiteral()
1380 PrintFloatingLiteral(OS, Node, /*PrintSuffix=*/true); in VisitFloatingLiteral()
1385 OS << "i"; in VisitImaginaryLiteral()
1389 Str->outputString(OS); in VisitStringLiteral()
1392 OS << "("; in VisitParenExpr()
1394 OS << ")"; in VisitParenExpr()
1398 OS << UnaryOperator::getOpcodeStr(Node->getOpcode()); in VisitUnaryOperator()
1407 OS << ' '; in VisitUnaryOperator()
1412 OS << ' '; in VisitUnaryOperator()
1419 OS << UnaryOperator::getOpcodeStr(Node->getOpcode()); in VisitUnaryOperator()
1423 OS << "__builtin_offsetof("; in VisitOffsetOfExpr()
1424 Node->getTypeSourceInfo()->getType().print(OS, Policy); in VisitOffsetOfExpr()
1425 OS << ", "; in VisitOffsetOfExpr()
1431 OS << "["; in VisitOffsetOfExpr()
1433 OS << "]"; in VisitOffsetOfExpr()
1448 OS << "."; in VisitOffsetOfExpr()
1451 OS << Id->getName(); in VisitOffsetOfExpr()
1453 OS << ")"; in VisitOffsetOfExpr()
1459 OS << "sizeof"; in VisitUnaryExprOrTypeTraitExpr()
1463 OS << "alignof"; in VisitUnaryExprOrTypeTraitExpr()
1465 OS << "_Alignof"; in VisitUnaryExprOrTypeTraitExpr()
1467 OS << "__alignof"; in VisitUnaryExprOrTypeTraitExpr()
1470 OS << "vec_step"; in VisitUnaryExprOrTypeTraitExpr()
1473 OS << "__builtin_omp_required_simd_align"; in VisitUnaryExprOrTypeTraitExpr()
1477 OS << '('; in VisitUnaryExprOrTypeTraitExpr()
1478 Node->getArgumentType().print(OS, Policy); in VisitUnaryExprOrTypeTraitExpr()
1479 OS << ')'; in VisitUnaryExprOrTypeTraitExpr()
1481 OS << " "; in VisitUnaryExprOrTypeTraitExpr()
1487 OS << "_Generic("; in VisitGenericSelectionExpr()
1490 OS << ", "; in VisitGenericSelectionExpr()
1493 OS << "default"; in VisitGenericSelectionExpr()
1495 T.print(OS, Policy); in VisitGenericSelectionExpr()
1496 OS << ": "; in VisitGenericSelectionExpr()
1499 OS << ")"; in VisitGenericSelectionExpr()
1504 OS << "["; in VisitArraySubscriptExpr()
1506 OS << "]"; in VisitArraySubscriptExpr()
1511 OS << "["; in VisitOMPArraySectionExpr()
1515 OS << ":"; in VisitOMPArraySectionExpr()
1519 OS << "]"; in VisitOMPArraySectionExpr()
1529 if (i) OS << ", "; in PrintCallArgs()
1536 OS << "("; in VisitCallExpr()
1538 OS << ")"; in VisitCallExpr()
1549 OS << (Node->isArrow() ? "->" : "."); in VisitMemberExpr()
1556 Qualifier->print(OS, Policy); in VisitMemberExpr()
1558 OS << "template "; in VisitMemberExpr()
1559 OS << Node->getMemberNameInfo(); in VisitMemberExpr()
1562 OS, Node->template_arguments(), Policy); in VisitMemberExpr()
1566 OS << (Node->isArrow() ? "->isa" : ".isa"); in VisitObjCIsaExpr()
1571 OS << "."; in VisitExtVectorElementExpr()
1572 OS << Node->getAccessor().getName(); in VisitExtVectorElementExpr()
1575 OS << '('; in VisitCStyleCastExpr()
1576 Node->getTypeAsWritten().print(OS, Policy); in VisitCStyleCastExpr()
1577 OS << ')'; in VisitCStyleCastExpr()
1581 OS << '('; in VisitCompoundLiteralExpr()
1582 Node->getType().print(OS, Policy); in VisitCompoundLiteralExpr()
1583 OS << ')'; in VisitCompoundLiteralExpr()
1592 OS << " " << BinaryOperator::getOpcodeStr(Node->getOpcode()) << " "; in VisitBinaryOperator()
1597 OS << " " << BinaryOperator::getOpcodeStr(Node->getOpcode()) << " "; in VisitCompoundAssignOperator()
1602 OS << " ? "; in VisitConditionalOperator()
1604 OS << " : "; in VisitConditionalOperator()
1613 OS << " ?: "; in VisitBinaryConditionalOperator()
1617 OS << "&&" << Node->getLabel()->getName(); in VisitAddrLabelExpr()
1621 OS << "("; in VisitStmtExpr()
1623 OS << ")"; in VisitStmtExpr()
1627 OS << "__builtin_choose_expr("; in VisitChooseExpr()
1629 OS << ", "; in VisitChooseExpr()
1631 OS << ", "; in VisitChooseExpr()
1633 OS << ")"; in VisitChooseExpr()
1637 OS << "__null"; in VisitGNUNullExpr()
1641 OS << "__builtin_shufflevector("; in VisitShuffleVectorExpr()
1643 if (i) OS << ", "; in VisitShuffleVectorExpr()
1646 OS << ")"; in VisitShuffleVectorExpr()
1650 OS << "__builtin_convertvector("; in VisitConvertVectorExpr()
1652 OS << ", "; in VisitConvertVectorExpr()
1653 Node->getType().print(OS, Policy); in VisitConvertVectorExpr()
1654 OS << ")"; in VisitConvertVectorExpr()
1663 OS << "{"; in VisitInitListExpr()
1665 if (i) OS << ", "; in VisitInitListExpr()
1669 OS << "{}"; in VisitInitListExpr()
1671 OS << "}"; in VisitInitListExpr()
1675 OS << "("; in VisitParenListExpr()
1677 if (i) OS << ", "; in VisitParenListExpr()
1680 OS << ")"; in VisitParenListExpr()
1689 OS << II->getName() << ":"; in VisitDesignatedInitExpr()
1693 OS << "." << D.getFieldName()->getName(); in VisitDesignatedInitExpr()
1696 OS << "["; in VisitDesignatedInitExpr()
1701 OS << " ... "; in VisitDesignatedInitExpr()
1704 OS << "]"; in VisitDesignatedInitExpr()
1709 OS << " = "; in VisitDesignatedInitExpr()
1711 OS << " "; in VisitDesignatedInitExpr()
1717 OS << "{"; in VisitDesignatedInitUpdateExpr()
1718 OS << "/*base*/"; in VisitDesignatedInitUpdateExpr()
1720 OS << ", "; in VisitDesignatedInitUpdateExpr()
1722 OS << "/*updater*/"; in VisitDesignatedInitUpdateExpr()
1724 OS << "}"; in VisitDesignatedInitUpdateExpr()
1728 OS << "/*no init*/"; in VisitNoInitExpr()
1733 OS << "/*implicit*/"; in VisitImplicitValueInitExpr()
1734 Node->getType().print(OS, Policy); in VisitImplicitValueInitExpr()
1735 OS << "()"; in VisitImplicitValueInitExpr()
1737 OS << "/*implicit*/("; in VisitImplicitValueInitExpr()
1738 Node->getType().print(OS, Policy); in VisitImplicitValueInitExpr()
1739 OS << ')'; in VisitImplicitValueInitExpr()
1741 OS << "{}"; in VisitImplicitValueInitExpr()
1743 OS << 0; in VisitImplicitValueInitExpr()
1748 OS << "__builtin_va_arg("; in VisitVAArgExpr()
1750 OS << ", "; in VisitVAArgExpr()
1751 Node->getType().print(OS, Policy); in VisitVAArgExpr()
1752 OS << ")"; in VisitVAArgExpr()
1769 OS << Name; in VisitAtomicExpr()
1775 OS << ", "; in VisitAtomicExpr()
1780 OS << ", "; in VisitAtomicExpr()
1785 OS << ", "; in VisitAtomicExpr()
1789 OS << ", "; in VisitAtomicExpr()
1793 OS << ", "; in VisitAtomicExpr()
1796 OS << ")"; in VisitAtomicExpr()
1811 OS << OpStrings[Kind] << ' '; in VisitCXXOperatorCallExpr()
1815 OS << ' ' << OpStrings[Kind]; in VisitCXXOperatorCallExpr()
1821 OS << '('; in VisitCXXOperatorCallExpr()
1824 OS << ", "; in VisitCXXOperatorCallExpr()
1828 OS << ')'; in VisitCXXOperatorCallExpr()
1831 OS << '['; in VisitCXXOperatorCallExpr()
1833 OS << ']'; in VisitCXXOperatorCallExpr()
1835 OS << OpStrings[Kind] << ' '; in VisitCXXOperatorCallExpr()
1839 OS << ' ' << OpStrings[Kind] << ' '; in VisitCXXOperatorCallExpr()
1858 OS << "<<<"; in VisitCUDAKernelCallExpr()
1860 OS << ">>>("; in VisitCUDAKernelCallExpr()
1862 OS << ")"; in VisitCUDAKernelCallExpr()
1866 OS << Node->getCastName() << '<'; in VisitCXXNamedCastExpr()
1867 Node->getTypeAsWritten().print(OS, Policy); in VisitCXXNamedCastExpr()
1868 OS << ">("; in VisitCXXNamedCastExpr()
1870 OS << ")"; in VisitCXXNamedCastExpr()
1890 OS << "typeid("; in VisitCXXTypeidExpr()
1892 Node->getTypeOperandSourceInfo()->getType().print(OS, Policy); in VisitCXXTypeidExpr()
1896 OS << ")"; in VisitCXXTypeidExpr()
1900 OS << "__uuidof("; in VisitCXXUuidofExpr()
1902 Node->getTypeOperandSourceInfo()->getType().print(OS, Policy); in VisitCXXUuidofExpr()
1906 OS << ")"; in VisitCXXUuidofExpr()
1912 OS << "->"; in VisitMSPropertyRefExpr()
1914 OS << "."; in VisitMSPropertyRefExpr()
1917 Qualifier->print(OS, Policy); in VisitMSPropertyRefExpr()
1918 OS << Node->getPropertyDecl()->getDeclName(); in VisitMSPropertyRefExpr()
1923 OS << "["; in VisitMSPropertySubscriptExpr()
1925 OS << "]"; in VisitMSPropertySubscriptExpr()
1931 OS << cast<StringLiteral>(Node->getArg(0)->IgnoreImpCasts())->getString(); in VisitUserDefinedLiteral()
1940 OS << "operator\"\"" << Node->getUDSuffix()->getName(); in VisitUserDefinedLiteral()
1942 OS, Args->asArray(), Policy); in VisitUserDefinedLiteral()
1943 OS << "()"; in VisitUserDefinedLiteral()
1950 OS << C; in VisitUserDefinedLiteral()
1957 OS << Int->getValue().toString(10, /*isSigned*/false); in VisitUserDefinedLiteral()
1963 PrintFloatingLiteral(OS, Float, /*PrintSuffix=*/false); in VisitUserDefinedLiteral()
1971 OS << Node->getUDSuffix()->getName(); in VisitUserDefinedLiteral()
1975 OS << (Node->getValue() ? "true" : "false"); in VisitCXXBoolLiteralExpr()
1979 OS << "nullptr"; in VisitCXXNullPtrLiteralExpr()
1983 OS << "this"; in VisitCXXThisExpr()
1988 OS << "throw"; in VisitCXXThrowExpr()
1990 OS << "throw "; in VisitCXXThrowExpr()
2004 Node->getType().print(OS, Policy); in VisitCXXFunctionalCastExpr()
2008 OS << "("; in VisitCXXFunctionalCastExpr()
2011 OS << ")"; in VisitCXXFunctionalCastExpr()
2019 Node->getType().print(OS, Policy); in VisitCXXTemporaryObjectExpr()
2023 OS << "{"; in VisitCXXTemporaryObjectExpr()
2025 OS << "("; in VisitCXXTemporaryObjectExpr()
2032 OS << ", "; in VisitCXXTemporaryObjectExpr()
2038 OS << "}"; in VisitCXXTemporaryObjectExpr()
2040 OS << ")"; in VisitCXXTemporaryObjectExpr()
2044 OS << '['; in VisitLambdaExpr()
2051 OS << '='; in VisitLambdaExpr()
2056 OS << '&'; in VisitLambdaExpr()
2065 OS << ", "; in VisitLambdaExpr()
2070 OS << "this"; in VisitLambdaExpr()
2073 OS << "*this"; in VisitLambdaExpr()
2077 OS << '&'; in VisitLambdaExpr()
2078 OS << C->getCapturedVar()->getName(); in VisitLambdaExpr()
2082 OS << C->getCapturedVar()->getName(); in VisitLambdaExpr()
2091 OS << ']'; in VisitLambdaExpr()
2094 OS << " ("; in VisitLambdaExpr()
2099 OS << ", "; in VisitLambdaExpr()
2104 P->getOriginalType().print(OS, Policy, ParamStr); in VisitLambdaExpr()
2108 OS << ", "; in VisitLambdaExpr()
2109 OS << "..."; in VisitLambdaExpr()
2111 OS << ')'; in VisitLambdaExpr()
2114 OS << " mutable"; in VisitLambdaExpr()
2118 Proto->printExceptionSpecification(OS, Policy); in VisitLambdaExpr()
2124 OS << " -> "; in VisitLambdaExpr()
2125 Proto->getReturnType().print(OS, Policy); in VisitLambdaExpr()
2131 OS << ' '; in VisitLambdaExpr()
2137 TSInfo->getType().print(OS, Policy); in VisitCXXScalarValueInitExpr()
2139 Node->getType().print(OS, Policy); in VisitCXXScalarValueInitExpr()
2140 OS << "()"; in VisitCXXScalarValueInitExpr()
2145 OS << "::"; in VisitCXXNewExpr()
2146 OS << "new "; in VisitCXXNewExpr()
2149 OS << "("; in VisitCXXNewExpr()
2154 OS << ", "; in VisitCXXNewExpr()
2157 OS << ") "; in VisitCXXNewExpr()
2160 OS << "("; in VisitCXXNewExpr()
2168 E->getAllocatedType().print(OS, Policy, TypeS); in VisitCXXNewExpr()
2170 OS << ")"; in VisitCXXNewExpr()
2175 OS << "("; in VisitCXXNewExpr()
2178 OS << ")"; in VisitCXXNewExpr()
2184 OS << "::"; in VisitCXXDeleteExpr()
2185 OS << "delete "; in VisitCXXDeleteExpr()
2187 OS << "[] "; in VisitCXXDeleteExpr()
2194 OS << "->"; in VisitCXXPseudoDestructorExpr()
2196 OS << '.'; in VisitCXXPseudoDestructorExpr()
2198 E->getQualifier()->print(OS, Policy); in VisitCXXPseudoDestructorExpr()
2199 OS << "~"; in VisitCXXPseudoDestructorExpr()
2202 OS << II->getName(); in VisitCXXPseudoDestructorExpr()
2204 E->getDestroyedType().print(OS, Policy); in VisitCXXPseudoDestructorExpr()
2209 OS << "{"; in VisitCXXConstructExpr()
2217 if (i) OS << ", "; in VisitCXXConstructExpr()
2222 OS << "}"; in VisitCXXConstructExpr()
2227 OS << "<forwarded>"; in VisitCXXInheritedCtorInitExpr()
2242 Node->getTypeAsWritten().print(OS, Policy); in VisitCXXUnresolvedConstructExpr()
2243 OS << "("; in VisitCXXUnresolvedConstructExpr()
2248 OS << ", "; in VisitCXXUnresolvedConstructExpr()
2251 OS << ")"; in VisitCXXUnresolvedConstructExpr()
2258 OS << (Node->isArrow() ? "->" : "."); in VisitCXXDependentScopeMemberExpr()
2261 Qualifier->print(OS, Policy); in VisitCXXDependentScopeMemberExpr()
2263 OS << "template "; in VisitCXXDependentScopeMemberExpr()
2264 OS << Node->getMemberNameInfo(); in VisitCXXDependentScopeMemberExpr()
2267 OS, Node->template_arguments(), Policy); in VisitCXXDependentScopeMemberExpr()
2273 OS << (Node->isArrow() ? "->" : "."); in VisitUnresolvedMemberExpr()
2276 Qualifier->print(OS, Policy); in VisitUnresolvedMemberExpr()
2278 OS << "template "; in VisitUnresolvedMemberExpr()
2279 OS << Node->getMemberNameInfo(); in VisitUnresolvedMemberExpr()
2282 OS, Node->template_arguments(), Policy); in VisitUnresolvedMemberExpr()
2315 OS << getTypeTraitName(E->getTrait()) << "("; in VisitTypeTraitExpr()
2318 OS << ", "; in VisitTypeTraitExpr()
2319 E->getArg(I)->getType().print(OS, Policy); in VisitTypeTraitExpr()
2321 OS << ")"; in VisitTypeTraitExpr()
2325 OS << getTypeTraitName(E->getTrait()) << '('; in VisitArrayTypeTraitExpr()
2326 E->getQueriedType().print(OS, Policy); in VisitArrayTypeTraitExpr()
2327 OS << ')'; in VisitArrayTypeTraitExpr()
2331 OS << getExpressionTraitName(E->getTrait()) << '('; in VisitExpressionTraitExpr()
2333 OS << ')'; in VisitExpressionTraitExpr()
2337 OS << "noexcept("; in VisitCXXNoexceptExpr()
2339 OS << ")"; in VisitCXXNoexceptExpr()
2344 OS << "..."; in VisitPackExpansionExpr()
2348 OS << "sizeof...(" << *E->getPack() << ")"; in VisitSizeOfPackExpr()
2353 OS << *Node->getParameterPack(); in VisitSubstNonTypeTemplateParmPackExpr()
2362 OS << *E->getParameterPack(); in VisitFunctionParmPackExpr()
2370 OS << "("; in VisitCXXFoldExpr()
2373 OS << " " << BinaryOperator::getOpcodeStr(E->getOperator()) << " "; in VisitCXXFoldExpr()
2375 OS << "..."; in VisitCXXFoldExpr()
2377 OS << " " << BinaryOperator::getOpcodeStr(E->getOperator()) << " "; in VisitCXXFoldExpr()
2380 OS << ")"; in VisitCXXFoldExpr()
2390 OS << "co_return"; in VisitCoreturnStmt()
2392 OS << " "; in VisitCoreturnStmt()
2395 OS << ";"; in VisitCoreturnStmt()
2399 OS << "co_await "; in VisitCoawaitExpr()
2404 OS << "co_yield "; in VisitCoyieldExpr()
2411 OS << "@"; in VisitObjCStringLiteral()
2416 OS << "@"; in VisitObjCBoxedExpr()
2421 OS << "@[ "; in VisitObjCArrayLiteral()
2425 OS << ", "; in VisitObjCArrayLiteral()
2428 OS << " ]"; in VisitObjCArrayLiteral()
2432 OS << "@{ "; in VisitObjCDictionaryLiteral()
2435 OS << ", "; in VisitObjCDictionaryLiteral()
2439 OS << " : "; in VisitObjCDictionaryLiteral()
2442 OS << "..."; in VisitObjCDictionaryLiteral()
2444 OS << " }"; in VisitObjCDictionaryLiteral()
2448 OS << "@encode("; in VisitObjCEncodeExpr()
2449 Node->getEncodedType().print(OS, Policy); in VisitObjCEncodeExpr()
2450 OS << ')'; in VisitObjCEncodeExpr()
2454 OS << "@selector("; in VisitObjCSelectorExpr()
2455 Node->getSelector().print(OS); in VisitObjCSelectorExpr()
2456 OS << ')'; in VisitObjCSelectorExpr()
2460 OS << "@protocol(" << *Node->getProtocol() << ')'; in VisitObjCProtocolExpr()
2464 OS << "["; in VisitObjCMessageExpr()
2471 Mess->getClassReceiver().print(OS, Policy); in VisitObjCMessageExpr()
2476 OS << "Super"; in VisitObjCMessageExpr()
2480 OS << ' '; in VisitObjCMessageExpr()
2483 OS << selector.getNameForSlot(0); in VisitObjCMessageExpr()
2487 if (i > 0) OS << ' '; in VisitObjCMessageExpr()
2489 OS << selector.getIdentifierInfoForSlot(i)->getName() << ':'; in VisitObjCMessageExpr()
2491 OS << ":"; in VisitObjCMessageExpr()
2493 else OS << ", "; // Handle variadic methods. in VisitObjCMessageExpr()
2498 OS << "]"; in VisitObjCMessageExpr()
2502 OS << (Node->getValue() ? "__objc_yes" : "__objc_no"); in VisitObjCBoolLiteralExpr()
2512 OS << '(' << E->getBridgeKindName(); in VisitObjCBridgedCastExpr()
2513 E->getType().print(OS, Policy); in VisitObjCBridgedCastExpr()
2514 OS << ')'; in VisitObjCBridgedCastExpr()
2520 OS << "^"; in VisitBlockExpr()
2525 OS << "()"; in VisitBlockExpr()
2527 OS << '('; in VisitBlockExpr()
2530 if (AI != BD->param_begin()) OS << ", "; in VisitBlockExpr()
2532 (*AI)->getType().print(OS, Policy, ParamStr); in VisitBlockExpr()
2537 if (!BD->param_empty()) OS << ", "; in VisitBlockExpr()
2538 OS << "..."; in VisitBlockExpr()
2540 OS << ')'; in VisitBlockExpr()
2542 OS << "{ }"; in VisitBlockExpr()
2555 OS << "__builtin_astype("; in VisitAsTypeExpr()
2557 OS << ", "; in VisitAsTypeExpr()
2558 Node->getType().print(OS, Policy); in VisitAsTypeExpr()
2559 OS << ")"; in VisitAsTypeExpr()
2570 void Stmt::printPretty(raw_ostream &OS, in printPretty() argument
2574 StmtPrinter P(OS, Helper, Policy, Indentation); in printPretty()