aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/JSONNodeDumper.cpp
diff options
context:
space:
mode:
authorSirraide <aeternalmail@gmail.com>2024-04-14 12:30:01 +0200
committerGitHub <noreply@github.com>2024-04-14 12:30:01 +0200
commitef164cee90477e294ff692209b4cf97a0e1958ed (patch)
tree3c287ecad68abfcc42764475fb6906c1da856afc /clang/lib/AST/JSONNodeDumper.cpp
parented06b847d4e77d0b81fa6b095366bb070db57846 (diff)
downloadllvm-ef164cee90477e294ff692209b4cf97a0e1958ed.zip
llvm-ef164cee90477e294ff692209b4cf97a0e1958ed.tar.gz
llvm-ef164cee90477e294ff692209b4cf97a0e1958ed.tar.bz2
[Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (#86526)
This implements support for the `= delete("message")` syntax that was only just added to C++26 ([P2573R2](https://isocpp.org/files/papers/P2573R2.html#proposal-scope)).
Diffstat (limited to 'clang/lib/AST/JSONNodeDumper.cpp')
-rw-r--r--clang/lib/AST/JSONNodeDumper.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/JSONNodeDumper.cpp b/clang/lib/AST/JSONNodeDumper.cpp
index 7811520..4260847 100644
--- a/clang/lib/AST/JSONNodeDumper.cpp
+++ b/clang/lib/AST/JSONNodeDumper.cpp
@@ -975,6 +975,9 @@ void JSONNodeDumper::VisitFunctionDecl(const FunctionDecl *FD) {
if (FD->isDefaulted())
JOS.attribute("explicitlyDefaulted",
FD->isDeleted() ? "deleted" : "default");
+
+ if (StringLiteral *Msg = FD->getDeletedMessage())
+ JOS.attribute("deletedMessage", Msg->getString());
}
void JSONNodeDumper::VisitEnumDecl(const EnumDecl *ED) {