bwendling wrote: > > @AaronBallman It's not letting me comment on your comment. While a compound > > literal doesn't have a DRE, it's also not a flexible array, so it's not > > supposed to get this far. Note that this method should only be executed if > > the flexible array member exists and has the `counted_by` attribute. > > Sorry, I was being lazy with my examples and leaving stuff off. > > ``` > struct S { > int x, y; > int blah[] __counted_by(x); > }; > > int main() { > (struct S){ 1, 2 }.blah[0]; // incorrect code > } > ```
Ah! I see what you mean now. I'll make sure we can catch this. https://github.com/llvm/llvm-project/pull/73730 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits