================
@@ -1138,6 +1138,14 @@ CIRGenFunction::getVLASize(const VariableArrayType 
*type) {
   return {numElements, elementType};
 }
 
+CIRGenFunction::VlaSizePair
+CIRGenFunction::getVLAElements1D(const VariableArrayType *vla) {
+  mlir::Value vlaSize = vlaSizeMap[vla->getSizeExpr()];
+  assert(vlaSize && "no size for VLA!");
+  assert(vlaSize->getType() == sizeTy);
----------------
erichkeane wrote:

`vlaSize` isn't a pointer, so this fails to build:
```
runner/_work/llvm-project/llvm-project/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
2025-11-26T19:23:08.6857824Z 
/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/CIR/CodeGen/CIRGenFunction.cpp:1145:17:
 error: member reference type 'mlir::Value' is not a pointer; did you mean to 
use '.'?
2025-11-26T19:23:08.6859083Z  1145 |   assert(vlaSize->getType() == sizeTy);
2025-11-26T19:23:08.6859503Z       |          ~~~~~~~^~
2025-11-26T19:23:08.6859814Z       |                 .
2025-11-26T19:23:08.6860251Z /usr/include/assert.h:103:27: note: expanded from 
macro 'assert'
2025-11-26T19:23:08.6860727Z   103 |      (static_cast <bool> (expr)            
                             \
2025-11-26T19:23:08.6861052Z       |                           ^~~~
```

Note this seems to have been caught by pre-commit CI as well.

https://github.com/llvm/llvm-project/pull/169404
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to