efriedma-quic wrote:

ast-dump for your example:

```
|   | `-CallExpr 0xcc44978 <col:25, col:59> 'unsigned long'
|   |   |-ImplicitCastExpr 0xcc44960 <col:25> 'unsigned long (*)(const void *, 
int)' <BuiltinFnToFnPtr>
|   |   | `-DeclRefExpr 0xcc448b8 <col:25> '<builtin fn type>' Function 
0xcc446b0 '__builtin_dynamic_object_size' 'unsigned long (const void *, int)'
|   |   |-ImplicitCastExpr 0xcc449c0 <col:55> 'const void *' <BitCast>
|   |   | `-ImplicitCastExpr 0xcc449a8 <col:55> 'struct variable *' 
<LValueToRValue>
|   |   |   `-DeclRefExpr 0xcc448d8 <col:55> 'struct variable *' lvalue Var 
0xcc41278 'v' 'struct variable *'
|   |   `-IntegerLiteral 0xcc448f8 <col:58> 'int' 0
```

I guess CodeGenFunction::emitFlexibleArrayMemberSize calls 
IgnoreParenImpCasts() which throws away the lvalue-to-rvalue.


https://github.com/llvm/llvm-project/pull/110497
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to