This is an archive of the discontinued LLVM Phabricator instance.

Allow empty statements in naked functions in addition to ASM statements
ClosedPublic

Authored by • ehsan on Sep 8 2014, 7:32 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

• ehsan updated this revision to Diff 13437.Sep 8 2014, 7:32 PM
• ehsan retitled this revision from to Allow empty statements in naked functions in addition to ASM statements.
• ehsan updated this object.
• ehsan edited the test plan for this revision. (Show Details)
• ehsan added a reviewer: hansw.
• ehsan added a subscriber: Unknown Object (MLST).Sep 8 2014, 7:33 PM
hans added a subscriber: hans.Sep 8 2014, 7:41 PM
hans added inline comments.
lib/Sema/SemaDecl.cpp
10429 ↗(On Diff #13437)

Hmm, it feels like there could be other statements which don't have any children but are not a NullStmt. Might be safer to just check for NullStmt explicitly.

• ehsan updated this revision to Diff 13439.Sep 8 2014, 7:53 PM

Addressed the review comment.

hans accepted this revision.Sep 8 2014, 7:57 PM
hans added a reviewer: hans.

LGTM, thanks for fixing!

test/Sema/attr-naked.c
27 ↗(On Diff #13439)

Maybe add a t7 that has the actual case from the PR, i.e. both an asm and null statement.

This revision is now accepted and ready to land.Sep 8 2014, 7:57 PM
• ehsan closed this revision.Sep 8 2014, 7:59 PM
• ehsan updated this revision to Diff 13440.

Closed by commit rL217413 (authored by @ehsan).