[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 3 09:00:16 PDT 2023


cor3ntin added a comment.

In D155610#4557930 <https://reviews.llvm.org/D155610#4557930>, @hazohelet wrote:

> One concern from my side is that some unicode characters like `U+FEFF` (I added in test) are invisible, but it may not be a big concern because we also display integer representation in parens.

This is not an easy problem to solve. `pushEscapedString` does not escape formatting code points, such as `U+FEFF` because doing so break a bunch of scripts/emojis.
There are cases where it should probably be escaped but that fully depend on context, and it would require grapheme clusterization, which is a lot of work for limited value.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155610/new/

https://reviews.llvm.org/D155610



More information about the cfe-commits mailing list