[cfe-dev] Checking type conversion possibility

Manjunath Kudlur keveman at gmail.com
Thu Dec 13 20:23:16 PST 2012


Hello,

If I have 2 QualTypes, FromType and ToType, how do I check if converting an
R-value of type FromType to ToType is possible? I see TryCopyInitialization
used for something similar, but that needs an Expr* whose type is FromType.
Is there a way to create a temporary R-value with a given type? Something
akin to llvm::UndefValue::get(Type*) perhaps?

Thanks,
Manjunath
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121213/71e5aa22/attachment.html>


More information about the cfe-dev mailing list