While working on a different patch, I noticed that pretty-printing of UTF-8 character literals (from C++1z) did not get the proper u8 prefix. This patch tracks the fact that the character literal is UTF-8, even though the underlying character literal type is char. It adds some additional tests to ensure that character literal prefixes are properly tracked for all prefixes.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Thanks!
You also need to update ASTWriterDecl.cpp's construction of CharacterLiteralAbbrev to allow three bits of Kind rather than two. (You should be able to repro this with a PCH test pretty-printing a U'x' literal.)
lib/Sema/SemaTemplate.cpp | ||
---|---|---|
5507 | Ascii -> ASCII |
Comment Actions
Good catches! I've fixed those issues, and commit in r257097 (I thought I had the LG, but now notice I don't -- if this is a problem, I will revert).
Ascii -> ASCII