================ @@ -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); ---------------- mizvekov wrote:
But presumably, I'd have to go on and do this for all diagnostics stream operators, not just this one, otherwise it would not be helpful to the next individual, who just like me, did the same way it was done somewhere else :) 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