llvm-project
96e09302 - [flang][Evaluate] Fix AsGenericExpr for Relational (#138455)

Commit
257 days ago
[flang][Evaluate] Fix AsGenericExpr for Relational (#138455) The variant in Expr<Type<TypeCategory::Logical, KIND>> only contains Relational<SomeType>, not other, more specific Relational<T> types. When calling AsGenericExpr for a value of type Relational<T>, the AsExpr function will attempt to create Expr<> directly for Relational<T>, which won't work for the above reason. Implement an overload of AsExpr for Relational<T>, which will wrap the Relational<T> in Relational<SomeType> before creating Expr<>.
Author
Parents
Loading