1.. title:: clang-tidy - performance-type-promotion-in-math-fn
2
3performance-type-promotion-in-math-fn
4=====================================
5
6Finds calls to C math library functions (from ``math.h`` or, in C++, ``cmath``)
7with implicit ``float`` to ``double`` promotions.
8
9For example, warns on ``::sin(0.f)``, because this funciton's parameter is a
10double. You probably meant to call ``std::sin(0.f)`` (in C++), or ``sinf(0.f)``
11(in C).
12
13.. code-block:: c++
14
15  float a;
16  asin(a);
17
18  // becomes
19
20  float a;
21  std::asin(a);
22