aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/ParseDecl.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/Parse/ParseDecl.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/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 951e221..a990ef39 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -2678,6 +2678,7 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(
<< 1 /* delete */;
else
Diag(ConsumeToken(), diag::err_deleted_non_function);
+ SkipDeletedFunctionBody();
} else if (Tok.is(tok::kw_default)) {
if (D.isFunctionDeclarator())
Diag(ConsumeToken(), diag::err_default_delete_in_multiple_declaration)