hubert-reinterpretcast wrote: > > However, how hard to pass it into EmitAggregateCopy? Maybe we can fork > > EmitAggregateCopy -> EmitAggregateCopyCurrentOne + > > EmitAggregateCopyWithSourceLocation and incrementally transition from first > > to another? > > The source location is not the only issue. As noted in [#164548 > (comment)](https://github.com/llvm/llvm-project/pull/164548#discussion_r2529214150), > if we use `EmitCheckedLValue` while we still have the source expression, we > get better checking for array subscript operations.
@vitalybuka, ping. IMO, adding checks in `EmitAggregateCopy` is too late. Adding calls to `EmitCheckedLValue` earlier in the AST processing that eventually calls `EmitAggregateCopy` is more comprehensive. A test-driven approach that identifies the AST processing paths for common cases strikes a good development cost/user benefit ratio. When further cases are identified, they can be addressed individually without a large upfront refactoring. https://github.com/llvm/llvm-project/pull/164548 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
