[clang] [NFC][Sema] Move `Sema::AssignmentAction` into its own scoped enum (PR #106453)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 28 14:46:25 PDT 2024
================
@@ -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
More information about the cfe-commits
mailing list