zmodem wrote:

> Move the call to ActOnFields() before ParseLexedCAttributeList() in 
> ParseStructUnionBody for reordering so that the struct type is complete when 
> late-parsed attributes like counted_by get evaluated.

Someone who knows the parser better can correct me here, but intuitively the 
new ordering seems odd to me. Shouldn't `ActOnFields()` be able to assume that 
the fields have been fully parsed, including their attributes?

Maybe the real problem is that the code that evaluates the counted_by 
expression runs too early? Is it running during parsing rather than during 
semantic analysis?

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

Reply via email to