[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 25 18:55:49 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());
----------------
ChuanqiXu9 wrote:
I didn't understand. Since the string literal is required to be `unevaluated string`, I feel it may be good to record the string value directly by `StringLiteral::getBytes`.
https://github.com/llvm/llvm-project/pull/86526
More information about the cfe-commits
mailing list