AaronBallman wrote: Good catch on the VLA test cases @jyknight! It turns out we model VLAs very oddly in the type system. Given: ``` extern int n; int array[7][n]; ``` We make a VariableArrayType whose element type is a VariableArrayType rather than a ConstantArrayType of size 7 whose element type is a VariableArrayType. This made `_Countof` a little bit more complicated because we need to look through that design choice. I've implement that (in both ExprConstant.cpp and CGExprScalar.cpp), but we may someday want to do a deeper repair. Instead, I added a FIXME and a note in Type.h so others aren't surprised by this as well.
https://github.com/llvm/llvm-project/pull/133125 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits