Currently literals like '\xff' may be sign extended, resulting in output like '\Uffffffff', which is not valid.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM
lib/AST/StmtPrinter.cpp | ||
---|---|---|
1253–1256 ↗ | (On Diff #47822) | Hmm, this is not correct for multicharacter char literals: auto n = '\xff\xff\xff\xff'; Here, the value of the literal is -1, but printing it as '\xff' would give a literal of a different type. However, we get that case wrong here in general (printing invalid \U... escapes), so this is no worse than today. Can you add a FIXME? |