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 11// RUN: %check_clang_tidy %s bugprone-unintended-char-ostream-output %t -- \
22// RUN: -config="{CheckOptions: \
3- // RUN: {bugprone-unintended-char-ostream-output.CastTypeName: "uint8_t "}}"
3+ // RUN: {bugprone-unintended-char-ostream-output.CastTypeName: \"unsigned char\ "}}"
44
55namespace std {
66
@@ -33,12 +33,12 @@ void origin_ostream(std::ostream &os) {
3333 unsigned char unsigned_value = 9 ;
3434 os << unsigned_value;
3535 // 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);
3737
3838 signed char signed_value = 9 ;
3939 os << signed_value;
4040 // 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);
4242
4343 char char_value = 9 ;
4444 os << char_value;
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ void based_on_ostream(A &os) {
5757 os << char_value;
5858}
5959
60- void based_on_ostream (std::basic_ostream<unsigned char > &os) {
60+ void other_ostream_template_parameters (std::basic_ostream<unsigned char > &os) {
6161 unsigned char unsigned_value = 9 ;
6262 os << unsigned_value;
6363
You can’t perform that action at this time.
0 commit comments