================ @@ -7379,6 +7379,14 @@ class RecoveryExpr final : public Expr, friend class ASTStmtWriter; }; +/// Insertion operator for diagnostics. This allows sending +/// Expr into a diagnostic with <<. +inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, + const Expr *E) { + DB.AddTaggedVal(reinterpret_cast<uint64_t>(E), DiagnosticsEngine::ak_expr); ---------------- erichkeane wrote:
`intptr_t` /`uintptr_t` I think avoids any 'round trip' errors by standard, but I think `uint64_t` is going to be the same type ANYWAY so this is probably harmless at least. I think the suggestion to use `intptr_t`/`uintptr_t` is a good one that should happen. https://github.com/llvm/llvm-project/pull/134693 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits