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

via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 25 18:48:23 PDT 2024


================
@@ -761,6 +761,13 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) {
     }
   }
 
+  // FIXME: Hack: We're out of bits in FunctionDeclBits, so always
+  // add this even though it's 0 in the vast majority of cases. We
+  // might really want to consider storing this in the DefaultedFunctionInfo
+  // instead.
+  if (D->isDeletedAsWritten())
+    Record.AddStmt(D->getDeletedMessage());
----------------
Sirraide wrote:

I was going to go with that, but I couldn’t find any examples of that being done for string literals (at least not in this file), so I wasn’t sure whether that’d be the right approach, but it should be fine since it’s just a string literal.

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


More information about the cfe-commits mailing list