================ @@ -204,6 +204,24 @@ class SemaPPCallbacks; class TemplateDeductionInfo; } // namespace sema +// AssignmentAction - This is used by all the assignment diagnostic functions +// to represent what is actually causing the operation +enum class AssignmentAction : unsigned { + Assigning, + Passing, + Returning, + Converting, + Initializing, + Sending, + Casting, + Passing_CFAudited +}; +inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, + const AssignmentAction &AA) { + DB << (unsigned)AA; ---------------- Endilll wrote:
I backported `std::to_underlying` as `llvm::to_underlying` for this exact purpose. https://github.com/llvm/llvm-project/pull/106453 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits