================
@@ -6037,6 +6080,25 @@ static void print_elem(raw_ostream &OS,
StmtPrinterHelper &Helper,
OS << " (Lifetime ends)";
break;
+ case CFGElement::Kind::FullExprCleanup: {
+ auto MTEs = E.castAs<CFGFullExprCleanup>().getExpiringMTEs();
+ size_t MTECount = MTEs.size();
+ OS << "(FullExprCleanup collected " << MTECount
+ << (MTECount > 1 ? " MTEs: " : " MTE: ");
+ bool FirstMTE = true;
+ for (const MaterializeTemporaryExpr *MTE : MTEs) {
+ if (!FirstMTE)
+ OS << ", ";
+ if (!Helper.handledStmt(MTE->getSubExpr(), OS)) {
+ // Pretty print the sub-expresion as a fallback
+ MTE->printPretty(OS, &Helper, PrintingPolicy(Helper.getLangOpts()));
----------------
usx95 wrote:
I think this would print more than one line ? More than one line would disturb
the CFG printing completely. Its ok if thats not the case.
Could you please add a test to print the same.
https://github.com/llvm/llvm-project/pull/177985
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits