File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
// RUN: %check_clang_tidy %s bugprone-unintended-char-ostream-output %t -- \
2
2
// RUN: -config="{CheckOptions: \
3
- // RUN: {bugprone-unintended-char-ostream-output.CastTypeName: "uint8_t "}}"
3
+ // RUN: {bugprone-unintended-char-ostream-output.CastTypeName: \"unsigned char\ "}}"
4
4
5
5
namespace std {
6
6
@@ -33,12 +33,12 @@ void origin_ostream(std::ostream &os) {
33
33
unsigned char unsigned_value = 9 ;
34
34
os << unsigned_value;
35
35
// CHECK-MESSAGES: [[@LINE-1]]:6: warning: 'unsigned char' passed to 'operator<<' outputs as character instead of integer
36
- // CHECK-FIXES: os << static_cast<uint8_t >(unsigned_value);
36
+ // CHECK-FIXES: os << static_cast<unsigned char >(unsigned_value);
37
37
38
38
signed char signed_value = 9 ;
39
39
os << signed_value;
40
40
// CHECK-MESSAGES: [[@LINE-1]]:6: warning: 'signed char' passed to 'operator<<' outputs as character instead of integer
41
- // CHECK-FIXES: os << static_cast<uint8_t >(signed_value);
41
+ // CHECK-FIXES: os << static_cast<unsigned char >(signed_value);
42
42
43
43
char char_value = 9 ;
44
44
os << char_value;
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ void based_on_ostream(A &os) {
57
57
os << char_value;
58
58
}
59
59
60
- void based_on_ostream (std::basic_ostream<unsigned char > &os) {
60
+ void other_ostream_template_parameters (std::basic_ostream<unsigned char > &os) {
61
61
unsigned char unsigned_value = 9 ;
62
62
os << unsigned_value;
63
63
You can’t perform that action at this time.
0 commit comments