aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorcor3ntin <corentinjabot@gmail.com>2025-05-15 18:16:05 +0200
committerGitHub <noreply@github.com>2025-05-15 18:16:05 +0200
commit381a649fb991eadb0c594de2d8b6166fcc11345a (patch)
tree43cdf12a5413cd76e91ff4ea70f058436c6f5c23 /llvm/tools/llvm-objdump/llvm-objdump.cpp
parent540cf25a6df56fa1810a7411477dca9896aeed20 (diff)
downloadllvm-381a649fb991eadb0c594de2d8b6166fcc11345a.zip
llvm-381a649fb991eadb0c594de2d8b6166fcc11345a.tar.gz
llvm-381a649fb991eadb0c594de2d8b6166fcc11345a.tar.bz2
[Clang] Add warnings when mixing different charN_t types (#138708)
charN_t represent code units of different UTF encodings. Therefore the values of 2 different charN_t objects do not represent the same characters. In order to avoid comparing apples and oranges, we add new warnings to warn on: - Implicit conversions - Comparisons - Other cases involving arithmetic conversions We only produce the warning if we cannot establish the comparison would be safe through constant evaluation. The new `-Wimplicit-unicode-conversion` warning is enabled by default. Note that this PR intentionally doesn;t touches char/wchar_t, but it would be worth considering also warning on extending the new warnings to these types (in a follow up) Additionally most arithmetic operations on charN_t don't really make sense (ie what does it mean to addition code units), so we could add warnings for that. Fixes #138526
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions