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

via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 26 06:31:40 PDT 2024


================
@@ -873,9 +873,14 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) {
 
   if (D->isPureVirtual())
     Out << " = 0";
-  else if (D->isDeletedAsWritten())
+  else if (D->isDeletedAsWritten()) {
     Out << " = delete";
-  else if (D->isExplicitlyDefaulted())
+    if (const auto *M = D->getDeletedMessage()) {
----------------
Sirraide wrote:

Ah yeah, I have a habit of always writing `auto`, so I forget about this sometimes; will do.

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


More information about the cfe-commits mailing list