[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)
JJ Marr via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 5 15:43:30 PDT 2025
jj-marr wrote:
> You could make a universal option to configure autofixes. Make semicolon-separated list of key-value pairs, e.g. `int=int32_t;float=float32_t;char=char8_t`. User could specify any type he wants, and remove/add fixes for `int`, `char` and so on.
>
> By default, we could even put fixes for all common types and let the user delete/modify what doesn't like.
This is a good idea but even the basic configuration I wanted to do adds a lot of scope to the PR.
Autofix for `float` is implemented because it's easy to figure out w/o much ambiguity. Float/double/etc means "I want IEEE754" most of the time, with the only exception being `bfloat16`.
https://github.com/llvm/llvm-project/pull/146970
More information about the cfe-commits
mailing list