mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 06:26:08 +00:00
Revert "[clang][DeclPrinter] Fix missing semicolon in AST print for methods that are definitions without having a body"
This reverts commit a3da6284c23affdd9092b2641017e99d85c2d89b. It breaks tests on macOS as macOS doesn't support attribute alias.
This commit is contained in:
parent
3b73139150
commit
4098e13a71
@ -463,12 +463,12 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) {
|
||||
else if (isa<ObjCMethodDecl>(*D) && cast<ObjCMethodDecl>(*D)->hasBody())
|
||||
Terminator = nullptr;
|
||||
else if (auto FD = dyn_cast<FunctionDecl>(*D)) {
|
||||
if (FD->doesThisDeclarationHaveABody() && !FD->isDefaulted())
|
||||
if (FD->isThisDeclarationADefinition())
|
||||
Terminator = nullptr;
|
||||
else
|
||||
Terminator = ";";
|
||||
} else if (auto TD = dyn_cast<FunctionTemplateDecl>(*D)) {
|
||||
if (TD->getTemplatedDecl()->doesThisDeclarationHaveABody())
|
||||
if (TD->getTemplatedDecl()->isThisDeclarationADefinition())
|
||||
Terminator = nullptr;
|
||||
else
|
||||
Terminator = ";";
|
||||
|
@ -85,18 +85,3 @@ struct CurlyCtorInit {
|
||||
|
||||
// CHECK-NEXT: };
|
||||
};
|
||||
|
||||
|
||||
// CHECK: struct DefMethodsWithoutBody {
|
||||
struct DefMethodsWithoutBody {
|
||||
// CHECK-NEXT: DefMethodsWithoutBody() = delete;
|
||||
DefMethodsWithoutBody() = delete;
|
||||
|
||||
// CHECK-NEXT: DefMethodsWithoutBody() = default;
|
||||
~DefMethodsWithoutBody() = default;
|
||||
|
||||
// CHECK-NEXT: void m1() __attribute__((alias("X")));
|
||||
void m1() __attribute__((alias("X")));
|
||||
|
||||
// CHECK-NEXT: };
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user