================ @@ -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:
So the main reasons I haven’t done that are: 1. `setDeletedAsWritten()` is called in many different places, but only in one of them do we also set the message; 2. `setDeletedMessage()` does a lot more than `setDeletedAsWritten()`, because whereas the latter just sets a bit to true, the former may also have to allocate a `DefaultedOrDeletedInfo` first and also has a couple asserts to make sure calling it is well-formed. That said, `setDeletedMessage()` is currently only called in one place, directly after `setDeletedAsWritten()` (because all the other places where we need to set the message, e.g. serialisation, just directly create the `DefaultedOrDeletedInfo` instead), so if you still think we should just fold that into `setDeletedMessage()` then I’ll do that instead. https://github.com/llvm/llvm-project/pull/86526 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits