[clang] [clang-tools-extra] [libcxx] [clang] fix diagnostic printing of expressions ignoring LangOpts (PR #134693)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 8 07:35:57 PDT 2025
================
@@ -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:
We probably SHOULD, and you can do so without review if you care to. Else, we can just make @shafik do this, since he started it.
https://github.com/llvm/llvm-project/pull/134693
More information about the cfe-commits
mailing list