[PATCH] D53609: [AST] Don't store data for GNU range case statement if not needed.
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 24 18:15:02 PDT 2018
rjmccall added inline comments.
================
Comment at: include/clang/AST/Stmt.h:956
+ // with a range. Present if and only if caseStmtIsGNURange() is true.
+ enum { LHS, SUBSTMT, RHS, ELLIPSISLOC };
+ enum { NumMandatoryStmtPtr = 2 };
----------------
ELLIPSISLOC is dead.
Much like the other patch, I'm not sure it's okay to reorder the children here. Using a dynamic offset for extracting the sub-statement is probably fine. If you're worried about that cost, `StmtIterator` is already pretty complicated, and it's not frequently-used by the compiler; I think it would be fine to find ways to get it to visit the elements of an array out of order.
Repository:
rC Clang
https://reviews.llvm.org/D53609
More information about the cfe-commits
mailing list