[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 9 06:57:57 PDT 2024


================
@@ -709,6 +712,11 @@ void ODRHash::AddFunctionDecl(const FunctionDecl *Function,
     return;
   }
 
+  if (DeletedMessage) {
+    ID.AddString(DeletedMessage->getBytes());
+    return;
+  }
+
----------------
cor3ntin wrote:

I would move that after `AddBoolean(DeletedMessage);` - it make no sense to separate the delete specifier from its message. (there is a question of whether isExplicitlyDefaulted/isDeletedAsWritten should be after skip body, but that seems  logical as is, and at worse it would be pre-existing)

https://github.com/llvm/llvm-project/pull/86526


More information about the cfe-commits mailing list