[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 4 15:02:24 PDT 2025


vbvictor wrote:

> I'm planning for an autofix of float and double since it's unambiguous what those types should be.
For int types, maybe I'll give 3 options for an autofix:
Fixed (int32_t)
Fast (int_fast32_t)
Least (int_least32_t)

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.

https://github.com/llvm/llvm-project/pull/146970


More information about the cfe-commits mailing list