This implements ArrayInitLoopExprs in initializers and fixes a few issues I encountered along the way, with copy constructors generally.
Details
Diff Detail
Event Timeline
clang/lib/AST/Interp/ByteCodeExprGen.cpp | ||
---|---|---|
654–664 | Heh :) Good you notice this as well. Yes, that's something I was worried about. It's not intentional at all. I'll try adding a RAII object. |
clang/lib/AST/Interp/ByteCodeExprGen.cpp | ||
---|---|---|
649 | I don't think there's a real test case for this, we could as well change the initializer to *classify(SubExpr->getType());. It's just the pattern used everywhere else. We could also use classifyPrim instead. | |
clang/lib/AST/Interp/ByteCodeExprGen.h | ||
380 | The first time we see an ArrayInitLoopExpr, the ByteCodeExprGen<Emitter>::ArrayIndex will be None, so we need to use this here (note: just writing this right now, it's pretty late for me, I didn't test just using a uint64_t) |
Why an Optional? Your not checking it and I don't see how it won't be set?