1 | // RUN: %check_clang_tidy %s bugprone-signed-char-misuse %t -- -- -fsigned-char |
---|---|
2 | |
3 | int PlainChar() { |
4 | char CCharacter = -5; |
5 | int NCharacter = CCharacter; |
6 | // CHECK-MESSAGES: [[@LINE-1]]:20: warning: 'signed char' to 'int' conversion; consider casting to 'unsigned char' first. [bugprone-signed-char-misuse] |
7 | |
8 | return NCharacter; |
9 | } |
10 |