[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
Thu Jul 10 21:16:19 PDT 2025


================
@@ -0,0 +1,69 @@
+// RUN: %check_clang_tidy -std=c++11-or-later %s portability-avoid-platform-specific-fundamental-types %t -- -config="{CheckOptions: [{key: portability-avoid-platform-specific-fundamental-types.WarnOnInts, value: false}, {key: portability-avoid-platform-specific-fundamental-types.WarnOnFloats, value: false}]}"
+
----------------
vbvictor wrote:

Look at tests in `clang-tools-extra/test/clang-tidy/checkers/modernize/replace-auto-ptr.cpp`, see what cases you have not covered and add them.

Consider also:
```cpp
template<typename T>
void template_function() {}

template<>
void template_function<float>() {} // Will this fire warning?
```


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


More information about the cfe-commits mailing list