Question on use cases for OpaqueValueExpr

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Question on use cases for OpaqueValueExpr

Deep Majumder via cfe-dev
Hi all,

I have seen that sometimes clang builds an AST called OpaqueValueExpr. Expr.h includes the following comment

 /// OpaqueValueExpr - An expression referring to an opaque object of a
 /// fixed type and value class. These don't correspond to concrete
 /// syntax; instead they're used to express operations (usually copy
 /// operations) on values whose source is generally obvious from
 /// context.

I am not sure to understand what are the use cases of that kind of expression.

Is it for those expressions that need to be created (e.g .for the purpose of codegen) but they are not explicitly defined in the input? For instance a case where the spec tells us that something behaves as if some expression had actually been spelled in the code.

Thank you very much.

Roger Ferrer Ibáñez

cfe-dev mailing list
[hidden email]