[PATCH] D70190: [clang][modules] Add support for merging lifetime-extended temporaries

Tyker via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 13 12:34:00 PST 2019


Tyker added inline comments.


================
Comment at: clang/lib/AST/TextNodeDumper.cpp:1349-1350
+  }
+  OS << " subexpr";
+  dumpPointer(D);
+}
----------------
rsmith wrote:
> We shouldn't need this: the address of the declaration is dumped anyway by the infrastructure. (If you meant to dump the subexpression, I don't think that's what this does.)
> 
> Traversing from the `LifetimeExtendedTemporaryDecl` to its subexpression for dumping purposes should be done by `ASTNodeTraverser` (in `include/clang/AST/ASTNodeTraverser.h`).
I needed it during debugging and I thought i could be useful to others. but yes it is unreachable from -ast-dump

> If you meant to dump the subexpression, I don't think that's what this does.
it dumps the value of the pointer which can be used to know which MaterializedTemporaryExpr it is associated with.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70190/new/

https://reviews.llvm.org/D70190





More information about the cfe-commits mailing list