[PATCH] D53717: [AST] Only store the needed data in ForStmt.

2018-11-13 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno abandoned this revision. riccibruno added a comment. Herald added a reviewer: shafik. Let's close it for now. I agree that the complexity is probably not worth it. We can always resurrect it in the future. I will submit a patch doing the move into a new `StmtBase.h/.cpp` after I am do

[PATCH] D53717: [AST] Only store the needed data in ForStmt.

2018-10-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/Stmt.h:1863 + Expr *getCond() { +return reinterpret_cast(getTrailingObjects()[condOffset()]); + } riccibruno wrote: > rsmith wrote: > > Please `static_cast` rather than `reinterpret_cast` throughou

[PATCH] D53717: [AST] Only store the needed data in ForStmt.

2018-10-26 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 171340. riccibruno marked 6 inline comments as done. riccibruno added a comment. Add a flag in the output of -ast-dump indicating which sub-statement the `ForStmt` is storing. This removes the ambiguity in the output of -ast-dump. Repository: rC Clang

[PATCH] D53717: [AST] Only store the needed data in ForStmt.

2018-10-26 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In https://reviews.llvm.org/D53717#1276388, @rsmith wrote: > In https://reviews.llvm.org/D53717#1276245, @rsmith wrote: > > > Do you have evidence that this complexity is worthwhile? (I wouldn't > > imagine we have very many `ForStmt`s per translation unit, so saving

[PATCH] D53717: [AST] Only store the needed data in ForStmt.

2018-10-25 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D53717#1276245, @rsmith wrote: > Do you have evidence that this complexity is worthwhile? (I wouldn't imagine > we have very many `ForStmt`s per translation unit, so saving 16 bytes for > each of them seems unlikely to matter.) Strikes me th

[PATCH] D53717: [AST] Only store the needed data in ForStmt.

2018-10-25 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Do you have evidence that this complexity is worthwhile? (I wouldn't imagine we have very many `ForStmt`s per translation unit, so saving 16 bytes for each of them seems unlikely to matter.) Comment at: include/clang/AST/Stmt.h:1863 + Expr *getCond()

[PATCH] D53717: [AST] Only store the needed data in ForStmt.

2018-10-25 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: rjmccall. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. riccibruno added a dependency: D53716: [AST] Only store data for the NRVO candidate in ReturnStmt if needed.. Don't store the init statement and cond