El lun., 9 ago. 2021 12:40, Peter Maydell <peter.mayd...@linaro.org>
escribió:

> Is it right, or is this its "looks like this is returning an error
> indication" heuristic misfiring again ?
>
> My guess is the latter and it's caused by a mismatch
> between the prototype of visit_optional() (returns a
> status both by setting *present and in its return value)
> and the Visitor::optional method (returns a status only
> by setting *present, return void). I guess ideally we'd
> standardize on whether these things were intended to return
> a value or not.
>

Yeah, it's a false positive and the fix would be make Visitor::optional
return a bool: if the visitor implements it, it's mandatory to overwrite
*present, while non-input visitors (including the clone visitor) need not
implement it at all and visit_optional will just return *present.

Paolo


> thanks
> -- PMM
>
>

Reply via email to