[cfe-dev] char32_t value from APSInt

Pratyush Das via cfe-dev cfe-dev at lists.llvm.org
Thu Feb 11 22:09:30 PST 2021


Hi,

Is there a way to get a char32_t value from a variable of type llvm::APSInt?


I tried something like -

const char32_t Ch = Val.getZExtValue();

(where Val is of type llvm::APSInt) but this implicit casting doesn't seem
to work as it stores the same value as of type char.

I tried playing around with
https://llvm.org/doxygen/ConvertUTF_8h_source.html but couldn't find a way
to make this work.

Thanks,

-- 
Pratyush Das
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210212/d9932d8d/attachment.html>


More information about the cfe-dev mailing list