This is an archive of the discontinued LLVM Phabricator instance.

[clang][DeclPrinter] Fix missing semicolon in AST print for methods that are definitions without having a body
ClosedPublic

Authored by strimo378 on Jul 28 2023, 6:23 AM.

Details

Summary

DeclPrinter used FunctionDecl::isThisDeclarationADefinition to decide if the decl requires a semicolon at the end. However, there are several methods without body (that require a semicolon) that are definitions.

Diff Detail

Event Timeline

strimo378 created this revision.Jul 28 2023, 6:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2023, 6:23 AM
strimo378 requested review of this revision.Jul 28 2023, 6:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2023, 6:23 AM
aaron.ballman accepted this revision.Jul 28 2023, 7:28 AM

LGTM! When you land, please be sure to add Fixes https://github.com/llvm/llvm-project/issues/62996 to the commit message so the issue is automatically closed (and it makes it easier for people doing code archeology later). Thanks!

This revision is now accepted and ready to land.Jul 28 2023, 7:28 AM
This revision was landed with ongoing or failed builds.Jul 28 2023, 7:50 AM
This revision was automatically updated to reflect the committed changes.
error: aliases are not supported on darwin

Maybe create a different testcase that is not supported on Darwin?

thakis added a subscriber: thakis.Jul 28 2023, 11:27 AM

This breaks tests on Mac: http://45.33.8.238/macm1/65934/step_7.txt

Please take a look and revert for now if it takes a while to fix.

Sry for breaking builds. Can someone please revert it, I am currently not at work.

Am 28.07.2023 20:27 schrieb Nico Weber via Phabricator <reviews@reviews.llvm.org>:
thakis added a comment.

This breaks tests on Mac: http://45.33.8.238/macm1/65934/step_7.txt

Please take a look and revert for now if it takes a while to fix.

Repository:

rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION

https://reviews.llvm.org/D156533/new/

https://reviews.llvm.org/D156533