[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 10 02:16:48 PDT 2024
================
@@ -2484,6 +2498,9 @@ class FunctionDecl : public DeclaratorDecl,
void setDeletedAsWritten(bool D = true) { FunctionDeclBits.IsDeleted = D; }
+ /// Only valid if isDeletedAsWritten() returns true.
+ void setDeletedMessage(StringLiteral *Message);
+
----------------
Sirraide wrote:
> there is no scenario in which we would call setDeletedMessage without first calling setDeletedAsWritten
That’s true; I was thinking we might want to set the message elsewhere at some point, but I think that I was remembering the situation before I included it it in the `DefaultedOrDeletedInfo`. I’ll move it to `setDeletedAsWritten()` and just give it a default argument.
https://github.com/llvm/llvm-project/pull/86526
More information about the cfe-commits
mailing list