[clang-tools-extra] [clang-tidy][NFC] swap cppcoreguidelines-narrowing-conversions and bugprone-narrowing-conversions (PR #120245)
Julian Schmidt via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 19 16:31:21 PST 2024
================
@@ -1,10 +1,93 @@
.. title:: clang-tidy - bugprone-narrowing-conversions
-.. meta::
- :http-equiv=refresh: 5;URL=../cppcoreguidelines/narrowing-conversions.html
bugprone-narrowing-conversions
==============================
-The bugprone-narrowing-conversions check is an alias, please see
-:doc:`cppcoreguidelines-narrowing-conversions <../cppcoreguidelines/narrowing-conversions>`
-for more information.
+`cppcoreguidelines-narrowing-conversions` redirects here as an alias for this check.
+
+Checks for silent narrowing conversions, e.g: ``int i = 0; i += 0.1;``. While
+the issue is obvious in this former example, it might not be so in the
+following: ``void MyClass::f(double d) { int_member_ += d; }``.
+
+We enforce only part of the guideline, more specifically, we flag narrowing conversions from:
----------------
5chmidti wrote:
Should this part be slightly reworded?
https://github.com/llvm/llvm-project/pull/120245
More information about the cfe-commits
mailing list