[PATCH] D50152: [CodeGen] Merge equivalent block copy/helper functions
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 9 16:19:58 PDT 2018
rjmccall added inline comments.
================
Comment at: include/clang/AST/ASTContext.h:161
+ Expr *getCopyExpr() const;
+ bool canThrow() const;
+ llvm::PointerIntPair<Expr *, 1, bool> ExprAndFlag;
----------------
These should all just be defined inline.
================
Comment at: lib/CodeGen/CGBlocks.cpp:1725
BlockFieldFlags Flags, bool EHOnly,
+ bool DisposeCannotThrow, VarDecl *Var,
CodeGenFunction &CGF) {
----------------
Could you replace these two flags with something more semantic, like telling this function what the context of pushing the cleanup is — basically meaning, are we in the copy helper or the destroy helper? That will let you pull the comment explaining `DisposeCannotThrow` into this function, where it makes a lot more sense.
Repository:
rC Clang
https://reviews.llvm.org/D50152
More information about the cfe-commits
mailing list