You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
check_and_promote() is a function declared in Val.h that currently takes a ValPtr argument and a const Type* argument (as well as a bool and an optional Location* argument). @timwoj flagged in his review of #1578 that it would be more tidy if the second argument were const TypePtr&. I looked into making that change (which I agree with) and found that doing so is fairly involved, since Expr::InitVal() itself takes a const Type* that it then passes to check_and_promote(), and Expr::InitVal() is called in a bunch of places.
This issue is meant to flag the general desirability of these changes, but at a low priority given it's likely a fair amount of low-level grunt work to actually implement.
The text was updated successfully, but these errors were encountered:
I looked at this briefly and there's honestly a ton more we could do here with migrating to use IntrusivePtr, even just in the Expr code. For example, all of these methods:
check_and_promote()
is a function declared inVal.h
that currently takes aValPtr
argument and aconst Type*
argument (as well as abool
and an optionalLocation*
argument). @timwoj flagged in his review of #1578 that it would be more tidy if the second argument wereconst TypePtr&
. I looked into making that change (which I agree with) and found that doing so is fairly involved, sinceExpr::InitVal()
itself takes aconst Type*
that it then passes tocheck_and_promote()
, andExpr::InitVal()
is called in a bunch of places.This issue is meant to flag the general desirability of these changes, but at a low priority given it's likely a fair amount of low-level grunt work to actually implement.
The text was updated successfully, but these errors were encountered: