Lines Matching refs:Node

96     void VisitStmt(Stmt *Node) LLVM_ATTRIBUTE_UNUSED {  in VisitStmt()  argument
99 void VisitExpr(Expr *Node) LLVM_ATTRIBUTE_UNUSED { in VisitExpr() argument
102 void VisitCXXNamedCastExpr(CXXNamedCastExpr *Node);
106 void Visit##CLASS(CLASS *Node);
117 void StmtPrinter::PrintRawCompoundStmt(CompoundStmt *Node) { in PrintRawCompoundStmt() argument
119 for (auto *I : Node->body()) in PrintRawCompoundStmt()
134 void StmtPrinter::VisitNullStmt(NullStmt *Node) { in VisitNullStmt() argument
138 void StmtPrinter::VisitDeclStmt(DeclStmt *Node) { in VisitDeclStmt() argument
140 PrintRawDeclStmt(Node); in VisitDeclStmt()
144 void StmtPrinter::VisitCompoundStmt(CompoundStmt *Node) { in VisitCompoundStmt() argument
146 PrintRawCompoundStmt(Node); in VisitCompoundStmt()
150 void StmtPrinter::VisitCaseStmt(CaseStmt *Node) { in VisitCaseStmt() argument
152 PrintExpr(Node->getLHS()); in VisitCaseStmt()
153 if (Node->getRHS()) { in VisitCaseStmt()
155 PrintExpr(Node->getRHS()); in VisitCaseStmt()
159 PrintStmt(Node->getSubStmt(), 0); in VisitCaseStmt()
162 void StmtPrinter::VisitDefaultStmt(DefaultStmt *Node) { in VisitDefaultStmt() argument
164 PrintStmt(Node->getSubStmt(), 0); in VisitDefaultStmt()
167 void StmtPrinter::VisitLabelStmt(LabelStmt *Node) { in VisitLabelStmt() argument
168 Indent(-1) << Node->getName() << ":\n"; in VisitLabelStmt()
169 PrintStmt(Node->getSubStmt(), 0); in VisitLabelStmt()
172 void StmtPrinter::VisitAttributedStmt(AttributedStmt *Node) { in VisitAttributedStmt() argument
173 for (const auto *Attr : Node->getAttrs()) { in VisitAttributedStmt()
177 PrintStmt(Node->getSubStmt(), 0); in VisitAttributedStmt()
220 void StmtPrinter::VisitSwitchStmt(SwitchStmt *Node) { in VisitSwitchStmt() argument
222 if (const DeclStmt *DS = Node->getConditionVariableDeclStmt()) in VisitSwitchStmt()
225 PrintExpr(Node->getCond()); in VisitSwitchStmt()
229 if (CompoundStmt *CS = dyn_cast<CompoundStmt>(Node->getBody())) { in VisitSwitchStmt()
235 PrintStmt(Node->getBody()); in VisitSwitchStmt()
239 void StmtPrinter::VisitWhileStmt(WhileStmt *Node) { in VisitWhileStmt() argument
241 if (const DeclStmt *DS = Node->getConditionVariableDeclStmt()) in VisitWhileStmt()
244 PrintExpr(Node->getCond()); in VisitWhileStmt()
246 PrintStmt(Node->getBody()); in VisitWhileStmt()
249 void StmtPrinter::VisitDoStmt(DoStmt *Node) { in VisitDoStmt() argument
251 if (CompoundStmt *CS = dyn_cast<CompoundStmt>(Node->getBody())) { in VisitDoStmt()
256 PrintStmt(Node->getBody()); in VisitDoStmt()
261 PrintExpr(Node->getCond()); in VisitDoStmt()
265 void StmtPrinter::VisitForStmt(ForStmt *Node) { in VisitForStmt() argument
267 if (Node->getInit()) { in VisitForStmt()
268 if (DeclStmt *DS = dyn_cast<DeclStmt>(Node->getInit())) in VisitForStmt()
271 PrintExpr(cast<Expr>(Node->getInit())); in VisitForStmt()
274 if (Node->getCond()) { in VisitForStmt()
276 PrintExpr(Node->getCond()); in VisitForStmt()
279 if (Node->getInc()) { in VisitForStmt()
281 PrintExpr(Node->getInc()); in VisitForStmt()
285 if (CompoundStmt *CS = dyn_cast<CompoundStmt>(Node->getBody())) { in VisitForStmt()
290 PrintStmt(Node->getBody()); in VisitForStmt()
294 void StmtPrinter::VisitObjCForCollectionStmt(ObjCForCollectionStmt *Node) { in VisitObjCForCollectionStmt() argument
296 if (DeclStmt *DS = dyn_cast<DeclStmt>(Node->getElement())) in VisitObjCForCollectionStmt()
299 PrintExpr(cast<Expr>(Node->getElement())); in VisitObjCForCollectionStmt()
301 PrintExpr(Node->getCollection()); in VisitObjCForCollectionStmt()
304 if (CompoundStmt *CS = dyn_cast<CompoundStmt>(Node->getBody())) { in VisitObjCForCollectionStmt()
309 PrintStmt(Node->getBody()); in VisitObjCForCollectionStmt()
313 void StmtPrinter::VisitCXXForRangeStmt(CXXForRangeStmt *Node) { in VisitCXXForRangeStmt() argument
317 Node->getLoopVariable()->print(OS, SubPolicy, IndentLevel); in VisitCXXForRangeStmt()
319 PrintExpr(Node->getRangeInit()); in VisitCXXForRangeStmt()
321 PrintStmt(Node->getBody()); in VisitCXXForRangeStmt()
326 void StmtPrinter::VisitMSDependentExistsStmt(MSDependentExistsStmt *Node) { in VisitMSDependentExistsStmt() argument
328 if (Node->isIfExists()) in VisitMSDependentExistsStmt()
334 = Node->getQualifierLoc().getNestedNameSpecifier()) in VisitMSDependentExistsStmt()
337 OS << Node->getNameInfo() << ") "; in VisitMSDependentExistsStmt()
339 PrintRawCompoundStmt(Node->getSubStmt()); in VisitMSDependentExistsStmt()
342 void StmtPrinter::VisitGotoStmt(GotoStmt *Node) { in VisitGotoStmt() argument
343 Indent() << "goto " << Node->getLabel()->getName() << ";"; in VisitGotoStmt()
347 void StmtPrinter::VisitIndirectGotoStmt(IndirectGotoStmt *Node) { in VisitIndirectGotoStmt() argument
349 PrintExpr(Node->getTarget()); in VisitIndirectGotoStmt()
354 void StmtPrinter::VisitContinueStmt(ContinueStmt *Node) { in VisitContinueStmt() argument
359 void StmtPrinter::VisitBreakStmt(BreakStmt *Node) { in VisitBreakStmt() argument
365 void StmtPrinter::VisitReturnStmt(ReturnStmt *Node) { in VisitReturnStmt() argument
367 if (Node->getRetValue()) { in VisitReturnStmt()
369 PrintExpr(Node->getRetValue()); in VisitReturnStmt()
376 void StmtPrinter::VisitGCCAsmStmt(GCCAsmStmt *Node) { in VisitGCCAsmStmt() argument
379 if (Node->isVolatile()) in VisitGCCAsmStmt()
383 VisitStringLiteral(Node->getAsmString()); in VisitGCCAsmStmt()
386 if (Node->getNumOutputs() != 0 || Node->getNumInputs() != 0 || in VisitGCCAsmStmt()
387 Node->getNumClobbers() != 0) in VisitGCCAsmStmt()
390 for (unsigned i = 0, e = Node->getNumOutputs(); i != e; ++i) { in VisitGCCAsmStmt()
394 if (!Node->getOutputName(i).empty()) { in VisitGCCAsmStmt()
396 OS << Node->getOutputName(i); in VisitGCCAsmStmt()
400 VisitStringLiteral(Node->getOutputConstraintLiteral(i)); in VisitGCCAsmStmt()
402 Visit(Node->getOutputExpr(i)); in VisitGCCAsmStmt()
407 if (Node->getNumInputs() != 0 || Node->getNumClobbers() != 0) in VisitGCCAsmStmt()
410 for (unsigned i = 0, e = Node->getNumInputs(); i != e; ++i) { in VisitGCCAsmStmt()
414 if (!Node->getInputName(i).empty()) { in VisitGCCAsmStmt()
416 OS << Node->getInputName(i); in VisitGCCAsmStmt()
420 VisitStringLiteral(Node->getInputConstraintLiteral(i)); in VisitGCCAsmStmt()
422 Visit(Node->getInputExpr(i)); in VisitGCCAsmStmt()
427 if (Node->getNumClobbers() != 0) in VisitGCCAsmStmt()
430 for (unsigned i = 0, e = Node->getNumClobbers(); i != e; ++i) { in VisitGCCAsmStmt()
434 VisitStringLiteral(Node->getClobberStringLiteral(i)); in VisitGCCAsmStmt()
441 void StmtPrinter::VisitMSAsmStmt(MSAsmStmt *Node) { in VisitMSAsmStmt() argument
444 if (Node->hasBraces()) in VisitMSAsmStmt()
446 OS << Node->getAsmString() << "\n"; in VisitMSAsmStmt()
447 if (Node->hasBraces()) in VisitMSAsmStmt()
451 void StmtPrinter::VisitCapturedStmt(CapturedStmt *Node) { in VisitCapturedStmt() argument
452 PrintStmt(Node->getCapturedDecl()->getBody()); in VisitCapturedStmt()
455 void StmtPrinter::VisitObjCAtTryStmt(ObjCAtTryStmt *Node) { in VisitObjCAtTryStmt() argument
457 if (CompoundStmt *TS = dyn_cast<CompoundStmt>(Node->getTryBody())) { in VisitObjCAtTryStmt()
462 for (unsigned I = 0, N = Node->getNumCatchStmts(); I != N; ++I) { in VisitObjCAtTryStmt()
463 ObjCAtCatchStmt *catchStmt = Node->getCatchStmt(I); in VisitObjCAtTryStmt()
477 Node->getFinallyStmt())) { in VisitObjCAtTryStmt()
484 void StmtPrinter::VisitObjCAtFinallyStmt(ObjCAtFinallyStmt *Node) { in VisitObjCAtFinallyStmt() argument
487 void StmtPrinter::VisitObjCAtCatchStmt (ObjCAtCatchStmt *Node) { in VisitObjCAtCatchStmt() argument
491 void StmtPrinter::VisitObjCAtThrowStmt(ObjCAtThrowStmt *Node) { in VisitObjCAtThrowStmt() argument
493 if (Node->getThrowExpr()) { in VisitObjCAtThrowStmt()
495 PrintExpr(Node->getThrowExpr()); in VisitObjCAtThrowStmt()
500 void StmtPrinter::VisitObjCAtSynchronizedStmt(ObjCAtSynchronizedStmt *Node) { in VisitObjCAtSynchronizedStmt() argument
502 PrintExpr(Node->getSynchExpr()); in VisitObjCAtSynchronizedStmt()
504 PrintRawCompoundStmt(Node->getSynchBody()); in VisitObjCAtSynchronizedStmt()
508 void StmtPrinter::VisitObjCAutoreleasePoolStmt(ObjCAutoreleasePoolStmt *Node) { in VisitObjCAutoreleasePoolStmt() argument
510 PrintRawCompoundStmt(dyn_cast<CompoundStmt>(Node->getSubStmt())); in VisitObjCAutoreleasePoolStmt()
514 void StmtPrinter::PrintRawCXXCatchStmt(CXXCatchStmt *Node) { in PrintRawCXXCatchStmt() argument
516 if (Decl *ExDecl = Node->getExceptionDecl()) in PrintRawCXXCatchStmt()
521 PrintRawCompoundStmt(cast<CompoundStmt>(Node->getHandlerBlock())); in PrintRawCXXCatchStmt()
524 void StmtPrinter::VisitCXXCatchStmt(CXXCatchStmt *Node) { in VisitCXXCatchStmt() argument
526 PrintRawCXXCatchStmt(Node); in VisitCXXCatchStmt()
530 void StmtPrinter::VisitCXXTryStmt(CXXTryStmt *Node) { in VisitCXXTryStmt() argument
532 PrintRawCompoundStmt(Node->getTryBlock()); in VisitCXXTryStmt()
533 for (unsigned i = 0, e = Node->getNumHandlers(); i < e; ++i) { in VisitCXXTryStmt()
535 PrintRawCXXCatchStmt(Node->getHandler(i)); in VisitCXXTryStmt()
540 void StmtPrinter::VisitSEHTryStmt(SEHTryStmt *Node) { in VisitSEHTryStmt() argument
541 Indent() << (Node->getIsCXXTry() ? "try " : "__try "); in VisitSEHTryStmt()
542 PrintRawCompoundStmt(Node->getTryBlock()); in VisitSEHTryStmt()
543 SEHExceptStmt *E = Node->getExceptHandler(); in VisitSEHTryStmt()
544 SEHFinallyStmt *F = Node->getFinallyHandler(); in VisitSEHTryStmt()
554 void StmtPrinter::PrintRawSEHFinallyStmt(SEHFinallyStmt *Node) { in PrintRawSEHFinallyStmt() argument
556 PrintRawCompoundStmt(Node->getBlock()); in PrintRawSEHFinallyStmt()
560 void StmtPrinter::PrintRawSEHExceptHandler(SEHExceptStmt *Node) { in PrintRawSEHExceptHandler() argument
562 VisitExpr(Node->getFilterExpr()); in PrintRawSEHExceptHandler()
564 PrintRawCompoundStmt(Node->getBlock()); in PrintRawSEHExceptHandler()
568 void StmtPrinter::VisitSEHExceptStmt(SEHExceptStmt *Node) { in VisitSEHExceptStmt() argument
570 PrintRawSEHExceptHandler(Node); in VisitSEHExceptStmt()
574 void StmtPrinter::VisitSEHFinallyStmt(SEHFinallyStmt *Node) { in VisitSEHFinallyStmt() argument
576 PrintRawSEHFinallyStmt(Node); in VisitSEHFinallyStmt()
580 void StmtPrinter::VisitSEHLeaveStmt(SEHLeaveStmt *Node) { in VisitSEHLeaveStmt() argument
595 void VisitOMPClauseList(T *Node, char StartSym);
604 void OMPClausePrinter::VisitOMPIfClause(OMPIfClause *Node) { in VisitOMPIfClause() argument
606 if (Node->getNameModifier() != OMPD_unknown) in VisitOMPIfClause()
607 OS << getOpenMPDirectiveName(Node->getNameModifier()) << ": "; in VisitOMPIfClause()
608 Node->getCondition()->printPretty(OS, nullptr, Policy, 0); in VisitOMPIfClause()
612 void OMPClausePrinter::VisitOMPFinalClause(OMPFinalClause *Node) { in VisitOMPFinalClause() argument
614 Node->getCondition()->printPretty(OS, nullptr, Policy, 0); in VisitOMPFinalClause()
618 void OMPClausePrinter::VisitOMPNumThreadsClause(OMPNumThreadsClause *Node) { in VisitOMPNumThreadsClause() argument
620 Node->getNumThreads()->printPretty(OS, nullptr, Policy, 0); in VisitOMPNumThreadsClause()
624 void OMPClausePrinter::VisitOMPSafelenClause(OMPSafelenClause *Node) { in VisitOMPSafelenClause() argument
626 Node->getSafelen()->printPretty(OS, nullptr, Policy, 0); in VisitOMPSafelenClause()
630 void OMPClausePrinter::VisitOMPSimdlenClause(OMPSimdlenClause *Node) { in VisitOMPSimdlenClause() argument
632 Node->getSimdlen()->printPretty(OS, nullptr, Policy, 0); in VisitOMPSimdlenClause()
636 void OMPClausePrinter::VisitOMPCollapseClause(OMPCollapseClause *Node) { in VisitOMPCollapseClause() argument
638 Node->getNumForLoops()->printPretty(OS, nullptr, Policy, 0); in VisitOMPCollapseClause()
642 void OMPClausePrinter::VisitOMPDefaultClause(OMPDefaultClause *Node) { in VisitOMPDefaultClause() argument
644 << getOpenMPSimpleClauseTypeName(OMPC_default, Node->getDefaultKind()) in VisitOMPDefaultClause()
648 void OMPClausePrinter::VisitOMPProcBindClause(OMPProcBindClause *Node) { in VisitOMPProcBindClause() argument
650 << getOpenMPSimpleClauseTypeName(OMPC_proc_bind, Node->getProcBindKind()) in VisitOMPProcBindClause()
654 void OMPClausePrinter::VisitOMPScheduleClause(OMPScheduleClause *Node) { in VisitOMPScheduleClause() argument
656 if (Node->getFirstScheduleModifier() != OMPC_SCHEDULE_MODIFIER_unknown) { in VisitOMPScheduleClause()
658 Node->getFirstScheduleModifier()); in VisitOMPScheduleClause()
659 if (Node->getSecondScheduleModifier() != OMPC_SCHEDULE_MODIFIER_unknown) { in VisitOMPScheduleClause()
662 Node->getSecondScheduleModifier()); in VisitOMPScheduleClause()
666 OS << getOpenMPSimpleClauseTypeName(OMPC_schedule, Node->getScheduleKind()); in VisitOMPScheduleClause()
667 if (auto *E = Node->getChunkSize()) { in VisitOMPScheduleClause()
674 void OMPClausePrinter::VisitOMPOrderedClause(OMPOrderedClause *Node) { in VisitOMPOrderedClause() argument
676 if (auto *Num = Node->getNumForLoops()) { in VisitOMPOrderedClause()
721 void OMPClausePrinter::VisitOMPDeviceClause(OMPDeviceClause *Node) { in VisitOMPDeviceClause() argument
723 Node->getDevice()->printPretty(OS, nullptr, Policy, 0); in VisitOMPDeviceClause()
727 void OMPClausePrinter::VisitOMPNumTeamsClause(OMPNumTeamsClause *Node) { in VisitOMPNumTeamsClause() argument
729 Node->getNumTeams()->printPretty(OS, nullptr, Policy, 0); in VisitOMPNumTeamsClause()
733 void OMPClausePrinter::VisitOMPThreadLimitClause(OMPThreadLimitClause *Node) { in VisitOMPThreadLimitClause() argument
735 Node->getThreadLimit()->printPretty(OS, nullptr, Policy, 0); in VisitOMPThreadLimitClause()
739 void OMPClausePrinter::VisitOMPPriorityClause(OMPPriorityClause *Node) { in VisitOMPPriorityClause() argument
741 Node->getPriority()->printPretty(OS, nullptr, Policy, 0); in VisitOMPPriorityClause()
745 void OMPClausePrinter::VisitOMPGrainsizeClause(OMPGrainsizeClause *Node) { in VisitOMPGrainsizeClause() argument
747 Node->getGrainsize()->printPretty(OS, nullptr, Policy, 0); in VisitOMPGrainsizeClause()
751 void OMPClausePrinter::VisitOMPNumTasksClause(OMPNumTasksClause *Node) { in VisitOMPNumTasksClause() argument
753 Node->getNumTasks()->printPretty(OS, nullptr, Policy, 0); in VisitOMPNumTasksClause()
757 void OMPClausePrinter::VisitOMPHintClause(OMPHintClause *Node) { in VisitOMPHintClause() argument
759 Node->getHint()->printPretty(OS, nullptr, Policy, 0); in VisitOMPHintClause()
764 void OMPClausePrinter::VisitOMPClauseList(T *Node, char StartSym) { in VisitOMPClauseList() argument
765 for (typename T::varlist_iterator I = Node->varlist_begin(), in VisitOMPClauseList()
766 E = Node->varlist_end(); in VisitOMPClauseList()
769 OS << (I == Node->varlist_begin() ? StartSym : ','); in VisitOMPClauseList()
780 void OMPClausePrinter::VisitOMPPrivateClause(OMPPrivateClause *Node) { in VisitOMPPrivateClause() argument
781 if (!Node->varlist_empty()) { in VisitOMPPrivateClause()
783 VisitOMPClauseList(Node, '('); in VisitOMPPrivateClause()
788 void OMPClausePrinter::VisitOMPFirstprivateClause(OMPFirstprivateClause *Node) { in VisitOMPFirstprivateClause() argument
789 if (!Node->varlist_empty()) { in VisitOMPFirstprivateClause()
791 VisitOMPClauseList(Node, '('); in VisitOMPFirstprivateClause()
796 void OMPClausePrinter::VisitOMPLastprivateClause(OMPLastprivateClause *Node) { in VisitOMPLastprivateClause() argument
797 if (!Node->varlist_empty()) { in VisitOMPLastprivateClause()
799 VisitOMPClauseList(Node, '('); in VisitOMPLastprivateClause()
804 void OMPClausePrinter::VisitOMPSharedClause(OMPSharedClause *Node) { in VisitOMPSharedClause() argument
805 if (!Node->varlist_empty()) { in VisitOMPSharedClause()
807 VisitOMPClauseList(Node, '('); in VisitOMPSharedClause()
812 void OMPClausePrinter::VisitOMPReductionClause(OMPReductionClause *Node) { in VisitOMPReductionClause() argument
813 if (!Node->varlist_empty()) { in VisitOMPReductionClause()
816 Node->getQualifierLoc().getNestedNameSpecifier(); in VisitOMPReductionClause()
818 Node->getNameInfo().getName().getCXXOverloadedOperator(); in VisitOMPReductionClause()
826 OS << Node->getNameInfo(); in VisitOMPReductionClause()
829 VisitOMPClauseList(Node, ' '); in VisitOMPReductionClause()
834 void OMPClausePrinter::VisitOMPLinearClause(OMPLinearClause *Node) { in VisitOMPLinearClause() argument
835 if (!Node->varlist_empty()) { in VisitOMPLinearClause()
837 if (Node->getModifierLoc().isValid()) { in VisitOMPLinearClause()
839 << getOpenMPSimpleClauseTypeName(OMPC_linear, Node->getModifier()); in VisitOMPLinearClause()
841 VisitOMPClauseList(Node, '('); in VisitOMPLinearClause()
842 if (Node->getModifierLoc().isValid()) in VisitOMPLinearClause()
844 if (Node->getStep() != nullptr) { in VisitOMPLinearClause()
846 Node->getStep()->printPretty(OS, nullptr, Policy, 0); in VisitOMPLinearClause()
852 void OMPClausePrinter::VisitOMPAlignedClause(OMPAlignedClause *Node) { in VisitOMPAlignedClause() argument
853 if (!Node->varlist_empty()) { in VisitOMPAlignedClause()
855 VisitOMPClauseList(Node, '('); in VisitOMPAlignedClause()
856 if (Node->getAlignment() != nullptr) { in VisitOMPAlignedClause()
858 Node->getAlignment()->printPretty(OS, nullptr, Policy, 0); in VisitOMPAlignedClause()
864 void OMPClausePrinter::VisitOMPCopyinClause(OMPCopyinClause *Node) { in VisitOMPCopyinClause() argument
865 if (!Node->varlist_empty()) { in VisitOMPCopyinClause()
867 VisitOMPClauseList(Node, '('); in VisitOMPCopyinClause()
872 void OMPClausePrinter::VisitOMPCopyprivateClause(OMPCopyprivateClause *Node) { in VisitOMPCopyprivateClause() argument
873 if (!Node->varlist_empty()) { in VisitOMPCopyprivateClause()
875 VisitOMPClauseList(Node, '('); in VisitOMPCopyprivateClause()
880 void OMPClausePrinter::VisitOMPFlushClause(OMPFlushClause *Node) { in VisitOMPFlushClause() argument
881 if (!Node->varlist_empty()) { in VisitOMPFlushClause()
882 VisitOMPClauseList(Node, '('); in VisitOMPFlushClause()
887 void OMPClausePrinter::VisitOMPDependClause(OMPDependClause *Node) { in VisitOMPDependClause() argument
889 OS << getOpenMPSimpleClauseTypeName(Node->getClauseKind(), in VisitOMPDependClause()
890 Node->getDependencyKind()); in VisitOMPDependClause()
891 if (!Node->varlist_empty()) { in VisitOMPDependClause()
893 VisitOMPClauseList(Node, ' '); in VisitOMPDependClause()
898 void OMPClausePrinter::VisitOMPMapClause(OMPMapClause *Node) { in VisitOMPMapClause() argument
899 if (!Node->varlist_empty()) { in VisitOMPMapClause()
901 if (Node->getMapType() != OMPC_MAP_unknown) { in VisitOMPMapClause()
902 if (Node->getMapTypeModifier() != OMPC_MAP_unknown) { in VisitOMPMapClause()
904 Node->getMapTypeModifier()); in VisitOMPMapClause()
907 OS << getOpenMPSimpleClauseTypeName(OMPC_map, Node->getMapType()); in VisitOMPMapClause()
910 VisitOMPClauseList(Node, ' '); in VisitOMPMapClause()
915 void OMPClausePrinter::VisitOMPToClause(OMPToClause *Node) { in VisitOMPToClause() argument
916 if (!Node->varlist_empty()) { in VisitOMPToClause()
918 VisitOMPClauseList(Node, '('); in VisitOMPToClause()
923 void OMPClausePrinter::VisitOMPFromClause(OMPFromClause *Node) { in VisitOMPFromClause() argument
924 if (!Node->varlist_empty()) { in VisitOMPFromClause()
926 VisitOMPClauseList(Node, '('); in VisitOMPFromClause()
931 void OMPClausePrinter::VisitOMPDistScheduleClause(OMPDistScheduleClause *Node) { in VisitOMPDistScheduleClause() argument
933 OMPC_dist_schedule, Node->getDistScheduleKind()); in VisitOMPDistScheduleClause()
934 if (auto *E = Node->getChunkSize()) { in VisitOMPDistScheduleClause()
941 void OMPClausePrinter::VisitOMPDefaultmapClause(OMPDefaultmapClause *Node) { in VisitOMPDefaultmapClause() argument
944 Node->getDefaultmapModifier()); in VisitOMPDefaultmapClause()
947 Node->getDefaultmapKind()); in VisitOMPDefaultmapClause()
951 void OMPClausePrinter::VisitOMPUseDevicePtrClause(OMPUseDevicePtrClause *Node) { in VisitOMPUseDevicePtrClause() argument
952 if (!Node->varlist_empty()) { in VisitOMPUseDevicePtrClause()
954 VisitOMPClauseList(Node, '('); in VisitOMPUseDevicePtrClause()
959 void OMPClausePrinter::VisitOMPIsDevicePtrClause(OMPIsDevicePtrClause *Node) { in VisitOMPIsDevicePtrClause() argument
960 if (!Node->varlist_empty()) { in VisitOMPIsDevicePtrClause()
962 VisitOMPClauseList(Node, '('); in VisitOMPIsDevicePtrClause()
990 void StmtPrinter::VisitOMPParallelDirective(OMPParallelDirective *Node) { in VisitOMPParallelDirective() argument
992 PrintOMPExecutableDirective(Node); in VisitOMPParallelDirective()
995 void StmtPrinter::VisitOMPSimdDirective(OMPSimdDirective *Node) { in VisitOMPSimdDirective() argument
997 PrintOMPExecutableDirective(Node); in VisitOMPSimdDirective()
1000 void StmtPrinter::VisitOMPForDirective(OMPForDirective *Node) { in VisitOMPForDirective() argument
1002 PrintOMPExecutableDirective(Node); in VisitOMPForDirective()
1005 void StmtPrinter::VisitOMPForSimdDirective(OMPForSimdDirective *Node) { in VisitOMPForSimdDirective() argument
1007 PrintOMPExecutableDirective(Node); in VisitOMPForSimdDirective()
1010 void StmtPrinter::VisitOMPSectionsDirective(OMPSectionsDirective *Node) { in VisitOMPSectionsDirective() argument
1012 PrintOMPExecutableDirective(Node); in VisitOMPSectionsDirective()
1015 void StmtPrinter::VisitOMPSectionDirective(OMPSectionDirective *Node) { in VisitOMPSectionDirective() argument
1017 PrintOMPExecutableDirective(Node); in VisitOMPSectionDirective()
1020 void StmtPrinter::VisitOMPSingleDirective(OMPSingleDirective *Node) { in VisitOMPSingleDirective() argument
1022 PrintOMPExecutableDirective(Node); in VisitOMPSingleDirective()
1025 void StmtPrinter::VisitOMPMasterDirective(OMPMasterDirective *Node) { in VisitOMPMasterDirective() argument
1027 PrintOMPExecutableDirective(Node); in VisitOMPMasterDirective()
1030 void StmtPrinter::VisitOMPCriticalDirective(OMPCriticalDirective *Node) { in VisitOMPCriticalDirective() argument
1032 if (Node->getDirectiveName().getName()) { in VisitOMPCriticalDirective()
1034 Node->getDirectiveName().printName(OS); in VisitOMPCriticalDirective()
1038 PrintOMPExecutableDirective(Node); in VisitOMPCriticalDirective()
1041 void StmtPrinter::VisitOMPParallelForDirective(OMPParallelForDirective *Node) { in VisitOMPParallelForDirective() argument
1043 PrintOMPExecutableDirective(Node); in VisitOMPParallelForDirective()
1047 OMPParallelForSimdDirective *Node) { in VisitOMPParallelForSimdDirective() argument
1049 PrintOMPExecutableDirective(Node); in VisitOMPParallelForSimdDirective()
1053 OMPParallelSectionsDirective *Node) { in VisitOMPParallelSectionsDirective() argument
1055 PrintOMPExecutableDirective(Node); in VisitOMPParallelSectionsDirective()
1058 void StmtPrinter::VisitOMPTaskDirective(OMPTaskDirective *Node) { in VisitOMPTaskDirective() argument
1060 PrintOMPExecutableDirective(Node); in VisitOMPTaskDirective()
1063 void StmtPrinter::VisitOMPTaskyieldDirective(OMPTaskyieldDirective *Node) { in VisitOMPTaskyieldDirective() argument
1065 PrintOMPExecutableDirective(Node); in VisitOMPTaskyieldDirective()
1068 void StmtPrinter::VisitOMPBarrierDirective(OMPBarrierDirective *Node) { in VisitOMPBarrierDirective() argument
1070 PrintOMPExecutableDirective(Node); in VisitOMPBarrierDirective()
1073 void StmtPrinter::VisitOMPTaskwaitDirective(OMPTaskwaitDirective *Node) { in VisitOMPTaskwaitDirective() argument
1075 PrintOMPExecutableDirective(Node); in VisitOMPTaskwaitDirective()
1078 void StmtPrinter::VisitOMPTaskgroupDirective(OMPTaskgroupDirective *Node) { in VisitOMPTaskgroupDirective() argument
1080 PrintOMPExecutableDirective(Node); in VisitOMPTaskgroupDirective()
1083 void StmtPrinter::VisitOMPFlushDirective(OMPFlushDirective *Node) { in VisitOMPFlushDirective() argument
1085 PrintOMPExecutableDirective(Node); in VisitOMPFlushDirective()
1088 void StmtPrinter::VisitOMPOrderedDirective(OMPOrderedDirective *Node) { in VisitOMPOrderedDirective() argument
1090 PrintOMPExecutableDirective(Node); in VisitOMPOrderedDirective()
1093 void StmtPrinter::VisitOMPAtomicDirective(OMPAtomicDirective *Node) { in VisitOMPAtomicDirective() argument
1095 PrintOMPExecutableDirective(Node); in VisitOMPAtomicDirective()
1098 void StmtPrinter::VisitOMPTargetDirective(OMPTargetDirective *Node) { in VisitOMPTargetDirective() argument
1100 PrintOMPExecutableDirective(Node); in VisitOMPTargetDirective()
1103 void StmtPrinter::VisitOMPTargetDataDirective(OMPTargetDataDirective *Node) { in VisitOMPTargetDataDirective() argument
1105 PrintOMPExecutableDirective(Node); in VisitOMPTargetDataDirective()
1109 OMPTargetEnterDataDirective *Node) { in VisitOMPTargetEnterDataDirective() argument
1111 PrintOMPExecutableDirective(Node); in VisitOMPTargetEnterDataDirective()
1115 OMPTargetExitDataDirective *Node) { in VisitOMPTargetExitDataDirective() argument
1117 PrintOMPExecutableDirective(Node); in VisitOMPTargetExitDataDirective()
1121 OMPTargetParallelDirective *Node) { in VisitOMPTargetParallelDirective() argument
1123 PrintOMPExecutableDirective(Node); in VisitOMPTargetParallelDirective()
1127 OMPTargetParallelForDirective *Node) { in VisitOMPTargetParallelForDirective() argument
1129 PrintOMPExecutableDirective(Node); in VisitOMPTargetParallelForDirective()
1132 void StmtPrinter::VisitOMPTeamsDirective(OMPTeamsDirective *Node) { in VisitOMPTeamsDirective() argument
1134 PrintOMPExecutableDirective(Node); in VisitOMPTeamsDirective()
1138 OMPCancellationPointDirective *Node) { in VisitOMPCancellationPointDirective() argument
1140 << getOpenMPDirectiveName(Node->getCancelRegion()); in VisitOMPCancellationPointDirective()
1141 PrintOMPExecutableDirective(Node); in VisitOMPCancellationPointDirective()
1144 void StmtPrinter::VisitOMPCancelDirective(OMPCancelDirective *Node) { in VisitOMPCancelDirective() argument
1146 << getOpenMPDirectiveName(Node->getCancelRegion()) << " "; in VisitOMPCancelDirective()
1147 PrintOMPExecutableDirective(Node); in VisitOMPCancelDirective()
1150 void StmtPrinter::VisitOMPTaskLoopDirective(OMPTaskLoopDirective *Node) { in VisitOMPTaskLoopDirective() argument
1152 PrintOMPExecutableDirective(Node); in VisitOMPTaskLoopDirective()
1156 OMPTaskLoopSimdDirective *Node) { in VisitOMPTaskLoopSimdDirective() argument
1158 PrintOMPExecutableDirective(Node); in VisitOMPTaskLoopSimdDirective()
1161 void StmtPrinter::VisitOMPDistributeDirective(OMPDistributeDirective *Node) { in VisitOMPDistributeDirective() argument
1163 PrintOMPExecutableDirective(Node); in VisitOMPDistributeDirective()
1167 OMPTargetUpdateDirective *Node) { in VisitOMPTargetUpdateDirective() argument
1169 PrintOMPExecutableDirective(Node); in VisitOMPTargetUpdateDirective()
1173 OMPDistributeParallelForDirective *Node) { in VisitOMPDistributeParallelForDirective() argument
1175 PrintOMPExecutableDirective(Node); in VisitOMPDistributeParallelForDirective()
1179 OMPDistributeParallelForSimdDirective *Node) { in VisitOMPDistributeParallelForSimdDirective() argument
1181 PrintOMPExecutableDirective(Node); in VisitOMPDistributeParallelForSimdDirective()
1185 OMPDistributeSimdDirective *Node) { in VisitOMPDistributeSimdDirective() argument
1187 PrintOMPExecutableDirective(Node); in VisitOMPDistributeSimdDirective()
1191 OMPTargetParallelForSimdDirective *Node) { in VisitOMPTargetParallelForSimdDirective() argument
1193 PrintOMPExecutableDirective(Node); in VisitOMPTargetParallelForSimdDirective()
1200 void StmtPrinter::VisitDeclRefExpr(DeclRefExpr *Node) { in VisitDeclRefExpr() argument
1201 if (auto *OCED = dyn_cast<OMPCapturedExprDecl>(Node->getDecl())) { in VisitDeclRefExpr()
1205 if (NestedNameSpecifier *Qualifier = Node->getQualifier()) in VisitDeclRefExpr()
1207 if (Node->hasTemplateKeyword()) in VisitDeclRefExpr()
1209 OS << Node->getNameInfo(); in VisitDeclRefExpr()
1210 if (Node->hasExplicitTemplateArgs()) in VisitDeclRefExpr()
1212 OS, Node->template_arguments(), Policy); in VisitDeclRefExpr()
1216 DependentScopeDeclRefExpr *Node) { in VisitDependentScopeDeclRefExpr() argument
1217 if (NestedNameSpecifier *Qualifier = Node->getQualifier()) in VisitDependentScopeDeclRefExpr()
1219 if (Node->hasTemplateKeyword()) in VisitDependentScopeDeclRefExpr()
1221 OS << Node->getNameInfo(); in VisitDependentScopeDeclRefExpr()
1222 if (Node->hasExplicitTemplateArgs()) in VisitDependentScopeDeclRefExpr()
1224 OS, Node->template_arguments(), Policy); in VisitDependentScopeDeclRefExpr()
1227 void StmtPrinter::VisitUnresolvedLookupExpr(UnresolvedLookupExpr *Node) { in VisitUnresolvedLookupExpr() argument
1228 if (Node->getQualifier()) in VisitUnresolvedLookupExpr()
1229 Node->getQualifier()->print(OS, Policy); in VisitUnresolvedLookupExpr()
1230 if (Node->hasTemplateKeyword()) in VisitUnresolvedLookupExpr()
1232 OS << Node->getNameInfo(); in VisitUnresolvedLookupExpr()
1233 if (Node->hasExplicitTemplateArgs()) in VisitUnresolvedLookupExpr()
1235 OS, Node->template_arguments(), Policy); in VisitUnresolvedLookupExpr()
1238 void StmtPrinter::VisitObjCIvarRefExpr(ObjCIvarRefExpr *Node) { in VisitObjCIvarRefExpr() argument
1239 if (Node->getBase()) { in VisitObjCIvarRefExpr()
1240 PrintExpr(Node->getBase()); in VisitObjCIvarRefExpr()
1241 OS << (Node->isArrow() ? "->" : "."); in VisitObjCIvarRefExpr()
1243 OS << *Node->getDecl(); in VisitObjCIvarRefExpr()
1246 void StmtPrinter::VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *Node) { in VisitObjCPropertyRefExpr() argument
1247 if (Node->isSuperReceiver()) in VisitObjCPropertyRefExpr()
1249 else if (Node->isObjectReceiver() && Node->getBase()) { in VisitObjCPropertyRefExpr()
1250 PrintExpr(Node->getBase()); in VisitObjCPropertyRefExpr()
1252 } else if (Node->isClassReceiver() && Node->getClassReceiver()) { in VisitObjCPropertyRefExpr()
1253 OS << Node->getClassReceiver()->getName() << "."; in VisitObjCPropertyRefExpr()
1256 if (Node->isImplicitProperty()) in VisitObjCPropertyRefExpr()
1257 Node->getImplicitPropertyGetter()->getSelector().print(OS); in VisitObjCPropertyRefExpr()
1259 OS << Node->getExplicitProperty()->getName(); in VisitObjCPropertyRefExpr()
1262 void StmtPrinter::VisitObjCSubscriptRefExpr(ObjCSubscriptRefExpr *Node) { in VisitObjCSubscriptRefExpr() argument
1264 PrintExpr(Node->getBaseExpr()); in VisitObjCSubscriptRefExpr()
1266 PrintExpr(Node->getKeyExpr()); in VisitObjCSubscriptRefExpr()
1270 void StmtPrinter::VisitPredefinedExpr(PredefinedExpr *Node) { in VisitPredefinedExpr() argument
1271 OS << PredefinedExpr::getIdentTypeName(Node->getIdentType()); in VisitPredefinedExpr()
1274 void StmtPrinter::VisitCharacterLiteral(CharacterLiteral *Node) { in VisitCharacterLiteral() argument
1275 unsigned value = Node->getValue(); in VisitCharacterLiteral()
1277 switch (Node->getKind()) { in VisitCharacterLiteral()
1323 if ((value & ~0xFFu) == ~0xFFu && Node->getKind() == CharacterLiteral::Ascii) in VisitCharacterLiteral()
1336 void StmtPrinter::VisitIntegerLiteral(IntegerLiteral *Node) { in VisitIntegerLiteral() argument
1337 bool isSigned = Node->getType()->isSignedIntegerType(); in VisitIntegerLiteral()
1338 OS << Node->getValue().toString(10, isSigned); in VisitIntegerLiteral()
1341 switch (Node->getType()->getAs<BuiltinType>()->getKind()) { in VisitIntegerLiteral()
1357 static void PrintFloatingLiteral(raw_ostream &OS, FloatingLiteral *Node, in PrintFloatingLiteral() argument
1360 Node->getValue().toString(Str); in PrintFloatingLiteral()
1369 switch (Node->getType()->getAs<BuiltinType>()->getKind()) { in PrintFloatingLiteral()
1379 void StmtPrinter::VisitFloatingLiteral(FloatingLiteral *Node) { in VisitFloatingLiteral() argument
1380 PrintFloatingLiteral(OS, Node, /*PrintSuffix=*/true); in VisitFloatingLiteral()
1383 void StmtPrinter::VisitImaginaryLiteral(ImaginaryLiteral *Node) { in VisitImaginaryLiteral() argument
1384 PrintExpr(Node->getSubExpr()); in VisitImaginaryLiteral()
1391 void StmtPrinter::VisitParenExpr(ParenExpr *Node) { in VisitParenExpr() argument
1393 PrintExpr(Node->getSubExpr()); in VisitParenExpr()
1396 void StmtPrinter::VisitUnaryOperator(UnaryOperator *Node) { in VisitUnaryOperator() argument
1397 if (!Node->isPostfix()) { in VisitUnaryOperator()
1398 OS << UnaryOperator::getOpcodeStr(Node->getOpcode()); in VisitUnaryOperator()
1402 switch (Node->getOpcode()) { in VisitUnaryOperator()
1411 if (isa<UnaryOperator>(Node->getSubExpr())) in VisitUnaryOperator()
1416 PrintExpr(Node->getSubExpr()); in VisitUnaryOperator()
1418 if (Node->isPostfix()) in VisitUnaryOperator()
1419 OS << UnaryOperator::getOpcodeStr(Node->getOpcode()); in VisitUnaryOperator()
1422 void StmtPrinter::VisitOffsetOfExpr(OffsetOfExpr *Node) { in VisitOffsetOfExpr() argument
1424 Node->getTypeSourceInfo()->getType().print(OS, Policy); in VisitOffsetOfExpr()
1427 for (unsigned i = 0, n = Node->getNumComponents(); i < n; ++i) { in VisitOffsetOfExpr()
1428 OffsetOfNode ON = Node->getComponent(i); in VisitOffsetOfExpr()
1432 PrintExpr(Node->getIndexExpr(ON.getArrayExprIndex())); in VisitOffsetOfExpr()
1456 void StmtPrinter::VisitUnaryExprOrTypeTraitExpr(UnaryExprOrTypeTraitExpr *Node){ in VisitUnaryExprOrTypeTraitExpr() argument
1457 switch(Node->getKind()) { in VisitUnaryExprOrTypeTraitExpr()
1476 if (Node->isArgumentType()) { in VisitUnaryExprOrTypeTraitExpr()
1478 Node->getArgumentType().print(OS, Policy); in VisitUnaryExprOrTypeTraitExpr()
1482 PrintExpr(Node->getArgumentExpr()); in VisitUnaryExprOrTypeTraitExpr()
1486 void StmtPrinter::VisitGenericSelectionExpr(GenericSelectionExpr *Node) { in VisitGenericSelectionExpr() argument
1488 PrintExpr(Node->getControllingExpr()); in VisitGenericSelectionExpr()
1489 for (unsigned i = 0; i != Node->getNumAssocs(); ++i) { in VisitGenericSelectionExpr()
1491 QualType T = Node->getAssocType(i); in VisitGenericSelectionExpr()
1497 PrintExpr(Node->getAssocExpr(i)); in VisitGenericSelectionExpr()
1502 void StmtPrinter::VisitArraySubscriptExpr(ArraySubscriptExpr *Node) { in VisitArraySubscriptExpr() argument
1503 PrintExpr(Node->getLHS()); in VisitArraySubscriptExpr()
1505 PrintExpr(Node->getRHS()); in VisitArraySubscriptExpr()
1509 void StmtPrinter::VisitOMPArraySectionExpr(OMPArraySectionExpr *Node) { in VisitOMPArraySectionExpr() argument
1510 PrintExpr(Node->getBase()); in VisitOMPArraySectionExpr()
1512 if (Node->getLowerBound()) in VisitOMPArraySectionExpr()
1513 PrintExpr(Node->getLowerBound()); in VisitOMPArraySectionExpr()
1514 if (Node->getColonLoc().isValid()) { in VisitOMPArraySectionExpr()
1516 if (Node->getLength()) in VisitOMPArraySectionExpr()
1517 PrintExpr(Node->getLength()); in VisitOMPArraySectionExpr()
1540 void StmtPrinter::VisitMemberExpr(MemberExpr *Node) { in VisitMemberExpr() argument
1542 PrintExpr(Node->getBase()); in VisitMemberExpr()
1544 MemberExpr *ParentMember = dyn_cast<MemberExpr>(Node->getBase()); in VisitMemberExpr()
1549 OS << (Node->isArrow() ? "->" : "."); in VisitMemberExpr()
1551 if (FieldDecl *FD = dyn_cast<FieldDecl>(Node->getMemberDecl())) in VisitMemberExpr()
1555 if (NestedNameSpecifier *Qualifier = Node->getQualifier()) in VisitMemberExpr()
1557 if (Node->hasTemplateKeyword()) in VisitMemberExpr()
1559 OS << Node->getMemberNameInfo(); in VisitMemberExpr()
1560 if (Node->hasExplicitTemplateArgs()) in VisitMemberExpr()
1562 OS, Node->template_arguments(), Policy); in VisitMemberExpr()
1564 void StmtPrinter::VisitObjCIsaExpr(ObjCIsaExpr *Node) { in VisitObjCIsaExpr() argument
1565 PrintExpr(Node->getBase()); in VisitObjCIsaExpr()
1566 OS << (Node->isArrow() ? "->isa" : ".isa"); in VisitObjCIsaExpr()
1569 void StmtPrinter::VisitExtVectorElementExpr(ExtVectorElementExpr *Node) { in VisitExtVectorElementExpr() argument
1570 PrintExpr(Node->getBase()); in VisitExtVectorElementExpr()
1572 OS << Node->getAccessor().getName(); in VisitExtVectorElementExpr()
1574 void StmtPrinter::VisitCStyleCastExpr(CStyleCastExpr *Node) { in VisitCStyleCastExpr() argument
1576 Node->getTypeAsWritten().print(OS, Policy); in VisitCStyleCastExpr()
1578 PrintExpr(Node->getSubExpr()); in VisitCStyleCastExpr()
1580 void StmtPrinter::VisitCompoundLiteralExpr(CompoundLiteralExpr *Node) { in VisitCompoundLiteralExpr() argument
1582 Node->getType().print(OS, Policy); in VisitCompoundLiteralExpr()
1584 PrintExpr(Node->getInitializer()); in VisitCompoundLiteralExpr()
1586 void StmtPrinter::VisitImplicitCastExpr(ImplicitCastExpr *Node) { in VisitImplicitCastExpr() argument
1588 PrintExpr(Node->getSubExpr()); in VisitImplicitCastExpr()
1590 void StmtPrinter::VisitBinaryOperator(BinaryOperator *Node) { in VisitBinaryOperator() argument
1591 PrintExpr(Node->getLHS()); in VisitBinaryOperator()
1592 OS << " " << BinaryOperator::getOpcodeStr(Node->getOpcode()) << " "; in VisitBinaryOperator()
1593 PrintExpr(Node->getRHS()); in VisitBinaryOperator()
1595 void StmtPrinter::VisitCompoundAssignOperator(CompoundAssignOperator *Node) { in VisitCompoundAssignOperator() argument
1596 PrintExpr(Node->getLHS()); in VisitCompoundAssignOperator()
1597 OS << " " << BinaryOperator::getOpcodeStr(Node->getOpcode()) << " "; in VisitCompoundAssignOperator()
1598 PrintExpr(Node->getRHS()); in VisitCompoundAssignOperator()
1600 void StmtPrinter::VisitConditionalOperator(ConditionalOperator *Node) { in VisitConditionalOperator() argument
1601 PrintExpr(Node->getCond()); in VisitConditionalOperator()
1603 PrintExpr(Node->getLHS()); in VisitConditionalOperator()
1605 PrintExpr(Node->getRHS()); in VisitConditionalOperator()
1611 StmtPrinter::VisitBinaryConditionalOperator(BinaryConditionalOperator *Node) { in VisitBinaryConditionalOperator() argument
1612 PrintExpr(Node->getCommon()); in VisitBinaryConditionalOperator()
1614 PrintExpr(Node->getFalseExpr()); in VisitBinaryConditionalOperator()
1616 void StmtPrinter::VisitAddrLabelExpr(AddrLabelExpr *Node) { in VisitAddrLabelExpr() argument
1617 OS << "&&" << Node->getLabel()->getName(); in VisitAddrLabelExpr()
1626 void StmtPrinter::VisitChooseExpr(ChooseExpr *Node) { in VisitChooseExpr() argument
1628 PrintExpr(Node->getCond()); in VisitChooseExpr()
1630 PrintExpr(Node->getLHS()); in VisitChooseExpr()
1632 PrintExpr(Node->getRHS()); in VisitChooseExpr()
1640 void StmtPrinter::VisitShuffleVectorExpr(ShuffleVectorExpr *Node) { in VisitShuffleVectorExpr() argument
1642 for (unsigned i = 0, e = Node->getNumSubExprs(); i != e; ++i) { in VisitShuffleVectorExpr()
1644 PrintExpr(Node->getExpr(i)); in VisitShuffleVectorExpr()
1649 void StmtPrinter::VisitConvertVectorExpr(ConvertVectorExpr *Node) { in VisitConvertVectorExpr() argument
1651 PrintExpr(Node->getSrcExpr()); in VisitConvertVectorExpr()
1653 Node->getType().print(OS, Policy); in VisitConvertVectorExpr()
1657 void StmtPrinter::VisitInitListExpr(InitListExpr* Node) { in VisitInitListExpr() argument
1658 if (Node->getSyntacticForm()) { in VisitInitListExpr()
1659 Visit(Node->getSyntacticForm()); in VisitInitListExpr()
1664 for (unsigned i = 0, e = Node->getNumInits(); i != e; ++i) { in VisitInitListExpr()
1666 if (Node->getInit(i)) in VisitInitListExpr()
1667 PrintExpr(Node->getInit(i)); in VisitInitListExpr()
1674 void StmtPrinter::VisitParenListExpr(ParenListExpr* Node) { in VisitParenListExpr() argument
1676 for (unsigned i = 0, e = Node->getNumExprs(); i != e; ++i) { in VisitParenListExpr()
1678 PrintExpr(Node->getExpr(i)); in VisitParenListExpr()
1683 void StmtPrinter::VisitDesignatedInitExpr(DesignatedInitExpr *Node) { in VisitDesignatedInitExpr() argument
1685 for (const DesignatedInitExpr::Designator &D : Node->designators()) { in VisitDesignatedInitExpr()
1698 PrintExpr(Node->getArrayIndex(D)); in VisitDesignatedInitExpr()
1700 PrintExpr(Node->getArrayRangeStart(D)); in VisitDesignatedInitExpr()
1702 PrintExpr(Node->getArrayRangeEnd(D)); in VisitDesignatedInitExpr()
1712 PrintExpr(Node->getInit()); in VisitDesignatedInitExpr()
1716 DesignatedInitUpdateExpr *Node) { in VisitDesignatedInitUpdateExpr() argument
1719 PrintExpr(Node->getBase()); in VisitDesignatedInitUpdateExpr()
1723 PrintExpr(Node->getUpdater()); in VisitDesignatedInitUpdateExpr()
1727 void StmtPrinter::VisitNoInitExpr(NoInitExpr *Node) { in VisitNoInitExpr() argument
1731 void StmtPrinter::VisitImplicitValueInitExpr(ImplicitValueInitExpr *Node) { in VisitImplicitValueInitExpr() argument
1732 if (Node->getType()->getAsCXXRecordDecl()) { in VisitImplicitValueInitExpr()
1734 Node->getType().print(OS, Policy); in VisitImplicitValueInitExpr()
1738 Node->getType().print(OS, Policy); in VisitImplicitValueInitExpr()
1740 if (Node->getType()->isRecordType()) in VisitImplicitValueInitExpr()
1747 void StmtPrinter::VisitVAArgExpr(VAArgExpr *Node) { in VisitVAArgExpr() argument
1749 PrintExpr(Node->getSubExpr()); in VisitVAArgExpr()
1751 Node->getType().print(OS, Policy); in VisitVAArgExpr()
1755 void StmtPrinter::VisitPseudoObjectExpr(PseudoObjectExpr *Node) { in VisitPseudoObjectExpr() argument
1756 PrintExpr(Node->getSyntacticForm()); in VisitPseudoObjectExpr()
1759 void StmtPrinter::VisitAtomicExpr(AtomicExpr *Node) { in VisitAtomicExpr() argument
1761 switch (Node->getOp()) { in VisitAtomicExpr()
1772 PrintExpr(Node->getPtr()); in VisitAtomicExpr()
1773 if (Node->getOp() != AtomicExpr::AO__c11_atomic_load && in VisitAtomicExpr()
1774 Node->getOp() != AtomicExpr::AO__atomic_load_n) { in VisitAtomicExpr()
1776 PrintExpr(Node->getVal1()); in VisitAtomicExpr()
1778 if (Node->getOp() == AtomicExpr::AO__atomic_exchange || in VisitAtomicExpr()
1779 Node->isCmpXChg()) { in VisitAtomicExpr()
1781 PrintExpr(Node->getVal2()); in VisitAtomicExpr()
1783 if (Node->getOp() == AtomicExpr::AO__atomic_compare_exchange || in VisitAtomicExpr()
1784 Node->getOp() == AtomicExpr::AO__atomic_compare_exchange_n) { in VisitAtomicExpr()
1786 PrintExpr(Node->getWeak()); in VisitAtomicExpr()
1788 if (Node->getOp() != AtomicExpr::AO__c11_atomic_init) { in VisitAtomicExpr()
1790 PrintExpr(Node->getOrder()); in VisitAtomicExpr()
1792 if (Node->isCmpXChg()) { in VisitAtomicExpr()
1794 PrintExpr(Node->getOrderFail()); in VisitAtomicExpr()
1800 void StmtPrinter::VisitCXXOperatorCallExpr(CXXOperatorCallExpr *Node) { in VisitCXXOperatorCallExpr() argument
1808 OverloadedOperatorKind Kind = Node->getOperator(); in VisitCXXOperatorCallExpr()
1810 if (Node->getNumArgs() == 1) { in VisitCXXOperatorCallExpr()
1812 PrintExpr(Node->getArg(0)); in VisitCXXOperatorCallExpr()
1814 PrintExpr(Node->getArg(0)); in VisitCXXOperatorCallExpr()
1818 PrintExpr(Node->getArg(0)); in VisitCXXOperatorCallExpr()
1820 PrintExpr(Node->getArg(0)); in VisitCXXOperatorCallExpr()
1822 for (unsigned ArgIdx = 1; ArgIdx < Node->getNumArgs(); ++ArgIdx) { in VisitCXXOperatorCallExpr()
1825 if (!isa<CXXDefaultArgExpr>(Node->getArg(ArgIdx))) in VisitCXXOperatorCallExpr()
1826 PrintExpr(Node->getArg(ArgIdx)); in VisitCXXOperatorCallExpr()
1830 PrintExpr(Node->getArg(0)); in VisitCXXOperatorCallExpr()
1832 PrintExpr(Node->getArg(1)); in VisitCXXOperatorCallExpr()
1834 } else if (Node->getNumArgs() == 1) { in VisitCXXOperatorCallExpr()
1836 PrintExpr(Node->getArg(0)); in VisitCXXOperatorCallExpr()
1837 } else if (Node->getNumArgs() == 2) { in VisitCXXOperatorCallExpr()
1838 PrintExpr(Node->getArg(0)); in VisitCXXOperatorCallExpr()
1840 PrintExpr(Node->getArg(1)); in VisitCXXOperatorCallExpr()
1846 void StmtPrinter::VisitCXXMemberCallExpr(CXXMemberCallExpr *Node) { in VisitCXXMemberCallExpr() argument
1848 CXXMethodDecl *MD = Node->getMethodDecl(); in VisitCXXMemberCallExpr()
1850 PrintExpr(Node->getImplicitObjectArgument()); in VisitCXXMemberCallExpr()
1853 VisitCallExpr(cast<CallExpr>(Node)); in VisitCXXMemberCallExpr()
1856 void StmtPrinter::VisitCUDAKernelCallExpr(CUDAKernelCallExpr *Node) { in VisitCUDAKernelCallExpr() argument
1857 PrintExpr(Node->getCallee()); in VisitCUDAKernelCallExpr()
1859 PrintCallArgs(Node->getConfig()); in VisitCUDAKernelCallExpr()
1861 PrintCallArgs(Node); in VisitCUDAKernelCallExpr()
1865 void StmtPrinter::VisitCXXNamedCastExpr(CXXNamedCastExpr *Node) { in VisitCXXNamedCastExpr() argument
1866 OS << Node->getCastName() << '<'; in VisitCXXNamedCastExpr()
1867 Node->getTypeAsWritten().print(OS, Policy); in VisitCXXNamedCastExpr()
1869 PrintExpr(Node->getSubExpr()); in VisitCXXNamedCastExpr()
1873 void StmtPrinter::VisitCXXStaticCastExpr(CXXStaticCastExpr *Node) { in VisitCXXStaticCastExpr() argument
1874 VisitCXXNamedCastExpr(Node); in VisitCXXStaticCastExpr()
1877 void StmtPrinter::VisitCXXDynamicCastExpr(CXXDynamicCastExpr *Node) { in VisitCXXDynamicCastExpr() argument
1878 VisitCXXNamedCastExpr(Node); in VisitCXXDynamicCastExpr()
1881 void StmtPrinter::VisitCXXReinterpretCastExpr(CXXReinterpretCastExpr *Node) { in VisitCXXReinterpretCastExpr() argument
1882 VisitCXXNamedCastExpr(Node); in VisitCXXReinterpretCastExpr()
1885 void StmtPrinter::VisitCXXConstCastExpr(CXXConstCastExpr *Node) { in VisitCXXConstCastExpr() argument
1886 VisitCXXNamedCastExpr(Node); in VisitCXXConstCastExpr()
1889 void StmtPrinter::VisitCXXTypeidExpr(CXXTypeidExpr *Node) { in VisitCXXTypeidExpr() argument
1891 if (Node->isTypeOperand()) { in VisitCXXTypeidExpr()
1892 Node->getTypeOperandSourceInfo()->getType().print(OS, Policy); in VisitCXXTypeidExpr()
1894 PrintExpr(Node->getExprOperand()); in VisitCXXTypeidExpr()
1899 void StmtPrinter::VisitCXXUuidofExpr(CXXUuidofExpr *Node) { in VisitCXXUuidofExpr() argument
1901 if (Node->isTypeOperand()) { in VisitCXXUuidofExpr()
1902 Node->getTypeOperandSourceInfo()->getType().print(OS, Policy); in VisitCXXUuidofExpr()
1904 PrintExpr(Node->getExprOperand()); in VisitCXXUuidofExpr()
1909 void StmtPrinter::VisitMSPropertyRefExpr(MSPropertyRefExpr *Node) { in VisitMSPropertyRefExpr() argument
1910 PrintExpr(Node->getBaseExpr()); in VisitMSPropertyRefExpr()
1911 if (Node->isArrow()) in VisitMSPropertyRefExpr()
1916 Node->getQualifierLoc().getNestedNameSpecifier()) in VisitMSPropertyRefExpr()
1918 OS << Node->getPropertyDecl()->getDeclName(); in VisitMSPropertyRefExpr()
1921 void StmtPrinter::VisitMSPropertySubscriptExpr(MSPropertySubscriptExpr *Node) { in VisitMSPropertySubscriptExpr() argument
1922 PrintExpr(Node->getBase()); in VisitMSPropertySubscriptExpr()
1924 PrintExpr(Node->getIdx()); in VisitMSPropertySubscriptExpr()
1928 void StmtPrinter::VisitUserDefinedLiteral(UserDefinedLiteral *Node) { in VisitUserDefinedLiteral() argument
1929 switch (Node->getLiteralOperatorKind()) { in VisitUserDefinedLiteral()
1931 OS << cast<StringLiteral>(Node->getArg(0)->IgnoreImpCasts())->getString(); in VisitUserDefinedLiteral()
1934 DeclRefExpr *DRE = cast<DeclRefExpr>(Node->getCallee()->IgnoreImpCasts()); in VisitUserDefinedLiteral()
1940 OS << "operator\"\"" << Node->getUDSuffix()->getName(); in VisitUserDefinedLiteral()
1956 IntegerLiteral *Int = cast<IntegerLiteral>(Node->getCookedLiteral()); in VisitUserDefinedLiteral()
1962 FloatingLiteral *Float = cast<FloatingLiteral>(Node->getCookedLiteral()); in VisitUserDefinedLiteral()
1968 PrintExpr(Node->getCookedLiteral()); in VisitUserDefinedLiteral()
1971 OS << Node->getUDSuffix()->getName(); in VisitUserDefinedLiteral()
1974 void StmtPrinter::VisitCXXBoolLiteralExpr(CXXBoolLiteralExpr *Node) { in VisitCXXBoolLiteralExpr() argument
1975 OS << (Node->getValue() ? "true" : "false"); in VisitCXXBoolLiteralExpr()
1978 void StmtPrinter::VisitCXXNullPtrLiteralExpr(CXXNullPtrLiteralExpr *Node) { in VisitCXXNullPtrLiteralExpr() argument
1982 void StmtPrinter::VisitCXXThisExpr(CXXThisExpr *Node) { in VisitCXXThisExpr() argument
1986 void StmtPrinter::VisitCXXThrowExpr(CXXThrowExpr *Node) { in VisitCXXThrowExpr() argument
1987 if (!Node->getSubExpr()) in VisitCXXThrowExpr()
1991 PrintExpr(Node->getSubExpr()); in VisitCXXThrowExpr()
1995 void StmtPrinter::VisitCXXDefaultArgExpr(CXXDefaultArgExpr *Node) { in VisitCXXDefaultArgExpr() argument
1999 void StmtPrinter::VisitCXXDefaultInitExpr(CXXDefaultInitExpr *Node) { in VisitCXXDefaultInitExpr() argument
2003 void StmtPrinter::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr *Node) { in VisitCXXFunctionalCastExpr() argument
2004 Node->getType().print(OS, Policy); in VisitCXXFunctionalCastExpr()
2007 if (Node->getLParenLoc().isValid()) in VisitCXXFunctionalCastExpr()
2009 PrintExpr(Node->getSubExpr()); in VisitCXXFunctionalCastExpr()
2010 if (Node->getLParenLoc().isValid()) in VisitCXXFunctionalCastExpr()
2014 void StmtPrinter::VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *Node) { in VisitCXXBindTemporaryExpr() argument
2015 PrintExpr(Node->getSubExpr()); in VisitCXXBindTemporaryExpr()
2018 void StmtPrinter::VisitCXXTemporaryObjectExpr(CXXTemporaryObjectExpr *Node) { in VisitCXXTemporaryObjectExpr() argument
2019 Node->getType().print(OS, Policy); in VisitCXXTemporaryObjectExpr()
2020 if (Node->isStdInitListInitialization()) in VisitCXXTemporaryObjectExpr()
2022 else if (Node->isListInitialization()) in VisitCXXTemporaryObjectExpr()
2026 for (CXXTemporaryObjectExpr::arg_iterator Arg = Node->arg_begin(), in VisitCXXTemporaryObjectExpr()
2027 ArgEnd = Node->arg_end(); in VisitCXXTemporaryObjectExpr()
2031 if (Arg != Node->arg_begin()) in VisitCXXTemporaryObjectExpr()
2035 if (Node->isStdInitListInitialization()) in VisitCXXTemporaryObjectExpr()
2037 else if (Node->isListInitialization()) in VisitCXXTemporaryObjectExpr()
2043 void StmtPrinter::VisitLambdaExpr(LambdaExpr *Node) { in VisitLambdaExpr() argument
2046 switch (Node->getCaptureDefault()) { in VisitLambdaExpr()
2060 for (LambdaExpr::capture_iterator C = Node->explicit_capture_begin(), in VisitLambdaExpr()
2061 CEnd = Node->explicit_capture_end(); in VisitLambdaExpr()
2076 if (Node->getCaptureDefault() != LCD_ByRef || Node->isInitCapture(C)) in VisitLambdaExpr()
2088 if (Node->isInitCapture(C)) in VisitLambdaExpr()
2093 if (Node->hasExplicitParameters()) { in VisitLambdaExpr()
2095 CXXMethodDecl *Method = Node->getCallOperator(); in VisitLambdaExpr()
2113 if (Node->isMutable()) in VisitLambdaExpr()
2123 if (Node->hasExplicitResultType()) { in VisitLambdaExpr()
2130 CompoundStmt *Body = Node->getBody(); in VisitLambdaExpr()
2135 void StmtPrinter::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *Node) { in VisitCXXScalarValueInitExpr() argument
2136 if (TypeSourceInfo *TSInfo = Node->getTypeSourceInfo()) in VisitCXXScalarValueInitExpr()
2139 Node->getType().print(OS, Policy); in VisitCXXScalarValueInitExpr()
2241 CXXUnresolvedConstructExpr *Node) { in VisitCXXUnresolvedConstructExpr() argument
2242 Node->getTypeAsWritten().print(OS, Policy); in VisitCXXUnresolvedConstructExpr()
2244 for (CXXUnresolvedConstructExpr::arg_iterator Arg = Node->arg_begin(), in VisitCXXUnresolvedConstructExpr()
2245 ArgEnd = Node->arg_end(); in VisitCXXUnresolvedConstructExpr()
2247 if (Arg != Node->arg_begin()) in VisitCXXUnresolvedConstructExpr()
2255 CXXDependentScopeMemberExpr *Node) { in VisitCXXDependentScopeMemberExpr() argument
2256 if (!Node->isImplicitAccess()) { in VisitCXXDependentScopeMemberExpr()
2257 PrintExpr(Node->getBase()); in VisitCXXDependentScopeMemberExpr()
2258 OS << (Node->isArrow() ? "->" : "."); in VisitCXXDependentScopeMemberExpr()
2260 if (NestedNameSpecifier *Qualifier = Node->getQualifier()) in VisitCXXDependentScopeMemberExpr()
2262 if (Node->hasTemplateKeyword()) in VisitCXXDependentScopeMemberExpr()
2264 OS << Node->getMemberNameInfo(); in VisitCXXDependentScopeMemberExpr()
2265 if (Node->hasExplicitTemplateArgs()) in VisitCXXDependentScopeMemberExpr()
2267 OS, Node->template_arguments(), Policy); in VisitCXXDependentScopeMemberExpr()
2270 void StmtPrinter::VisitUnresolvedMemberExpr(UnresolvedMemberExpr *Node) { in VisitUnresolvedMemberExpr() argument
2271 if (!Node->isImplicitAccess()) { in VisitUnresolvedMemberExpr()
2272 PrintExpr(Node->getBase()); in VisitUnresolvedMemberExpr()
2273 OS << (Node->isArrow() ? "->" : "."); in VisitUnresolvedMemberExpr()
2275 if (NestedNameSpecifier *Qualifier = Node->getQualifier()) in VisitUnresolvedMemberExpr()
2277 if (Node->hasTemplateKeyword()) in VisitUnresolvedMemberExpr()
2279 OS << Node->getMemberNameInfo(); in VisitUnresolvedMemberExpr()
2280 if (Node->hasExplicitTemplateArgs()) in VisitUnresolvedMemberExpr()
2282 OS, Node->template_arguments(), Policy); in VisitUnresolvedMemberExpr()
2352 SubstNonTypeTemplateParmPackExpr *Node) { in VisitSubstNonTypeTemplateParmPackExpr() argument
2353 OS << *Node->getParameterPack(); in VisitSubstNonTypeTemplateParmPackExpr()
2357 SubstNonTypeTemplateParmExpr *Node) { in VisitSubstNonTypeTemplateParmExpr() argument
2358 Visit(Node->getReplacement()); in VisitSubstNonTypeTemplateParmExpr()
2365 void StmtPrinter::VisitMaterializeTemporaryExpr(MaterializeTemporaryExpr *Node){ in VisitMaterializeTemporaryExpr() argument
2366 PrintExpr(Node->GetTemporaryExpr()); in VisitMaterializeTemporaryExpr()
2410 void StmtPrinter::VisitObjCStringLiteral(ObjCStringLiteral *Node) { in VisitObjCStringLiteral() argument
2412 VisitStringLiteral(Node->getString()); in VisitObjCStringLiteral()
2447 void StmtPrinter::VisitObjCEncodeExpr(ObjCEncodeExpr *Node) { in VisitObjCEncodeExpr() argument
2449 Node->getEncodedType().print(OS, Policy); in VisitObjCEncodeExpr()
2453 void StmtPrinter::VisitObjCSelectorExpr(ObjCSelectorExpr *Node) { in VisitObjCSelectorExpr() argument
2455 Node->getSelector().print(OS); in VisitObjCSelectorExpr()
2459 void StmtPrinter::VisitObjCProtocolExpr(ObjCProtocolExpr *Node) { in VisitObjCProtocolExpr() argument
2460 OS << "@protocol(" << *Node->getProtocol() << ')'; in VisitObjCProtocolExpr()
2501 void StmtPrinter::VisitObjCBoolLiteralExpr(ObjCBoolLiteralExpr *Node) { in VisitObjCBoolLiteralExpr() argument
2502 OS << (Node->getValue() ? "__objc_yes" : "__objc_no"); in VisitObjCBoolLiteralExpr()
2518 void StmtPrinter::VisitBlockExpr(BlockExpr *Node) { in VisitBlockExpr() argument
2519 BlockDecl *BD = Node->getBlockDecl(); in VisitBlockExpr()
2522 const FunctionType *AFT = Node->getFunctionType(); in VisitBlockExpr()
2545 void StmtPrinter::VisitOpaqueValueExpr(OpaqueValueExpr *Node) { in VisitOpaqueValueExpr() argument
2546 PrintExpr(Node->getSourceExpr()); in VisitOpaqueValueExpr()
2549 void StmtPrinter::VisitTypoExpr(TypoExpr *Node) { in VisitTypoExpr() argument
2554 void StmtPrinter::VisitAsTypeExpr(AsTypeExpr *Node) { in VisitAsTypeExpr() argument
2556 PrintExpr(Node->getSrcExpr()); in VisitAsTypeExpr()
2558 Node->getType().print(OS, Policy); in VisitAsTypeExpr()