2 Commits

Author SHA1 Message Date
Congcong Cai
06814834a6
[clang-tidy] treat unsigned char and signed char as char type by default in bugprone-unintended-char-ostream-output (#134870)
Add `AllowedTypes` options to support custom defined char like type.
treat `unsigned char` and `signed char` as char like type by default.
The allowed types only effect when the var decl or explicit cast to this
non-canonical type names.

Fixed: #133425
2025-04-13 12:09:50 +08:00
Congcong Cai
56762b7ace
[clang-tidy] Add new check bugprone-unintended-char-ostream-output (#127720)
It wants to find unintended character output from `uint8_t` and `int8_t`
to an ostream.
e.g.
```c++
uint8_t v = 9;
std::cout << v;
```

---------

Co-authored-by: whisperity <whisperity@gmail.com>
2025-02-27 19:36:24 +08:00