[PATCH] D155610: [Clang][Sema] Fix display of characters on static assertion failure
Hubert Tong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 11 16:28:28 PDT 2023
hubert.reinterpretcast added inline comments.
================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16899
+ uint32_t CodePoint = static_cast<uint32_t>(V.getInt().getZExtValue());
+ PrintCharLiteralPrefix(BTy->getKind(), OS);
+ OS << '\'';
----------------
cor3ntin wrote:
> Looking at the diagnostics, I don't think it makes sense to print a prefix here. You could just leave that part out.
Why is removing the prefix better? The types can matter (characters outside the basic character set are allowed to have negative `char` values). Also, moving forward, the value of a character need not be the same in the various encodings.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155610/new/
https://reviews.llvm.org/D155610
More information about the cfe-commits
mailing list