This is an archive of the discontinued LLVM Phabricator instance.

[AST] Use llvm::TrailingObjects in CXXTryStmt
ClosedPublic

Authored by bricci on Jul 3 2018, 4:38 AM.

Details

Summary
  1. Use llvm::TrailingObjects in CXXTryStmt instead of manually doing the reinterpret_casts + pointer arithmetic. This is more consistent with other classes using this idiom and this make it clearer that this class has trailing objects.
  2. Make the class CXXTryStmt final since it has trailing objects.
  3. Move the friend declarations together.

No functional changes.

Diff Detail

Repository
rC Clang

Event Timeline

bricci created this revision.Jul 3 2018, 4:38 AM
bricci updated this revision to Diff 155563.Jul 14 2018, 12:03 PM
bricci retitled this revision from [AST] Use llvm::TrailingObjects in clang::CXXTryStmt to [AST] Use llvm::TrailingObjects in CXXTryStmt.
bricci edited the summary of this revision. (Show Details)
bricci added reviewers: arphaman, bkramer.
  1. Remove unnecessary use of getTrailingObjects and use getStmts instead.
  2. Move friend class ASTStmtReader; to the top with the other friend declaration.
  3. Reword message.
bricci updated this revision to Diff 155564.Jul 14 2018, 12:06 PM

wrong diff

This revision is now accepted and ready to land.Jul 23 2018, 5:11 AM
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.