You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
double f(bool t) {
double b = 1.0;
constexpr double a = std::numeric_limits::infinity();
return t ? b : a;
}
when invoked as:
clang-tidy --checks='*' test.cc
the following warning is reported:
test.cc:6:18: warning: narrowing conversion from constant 'double' to 'double' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions]
return t ? b : a;
^
The text was updated successfully, but these errors were encountered:
Extended Description
Tested with 12.0.0 and 13.0.0.
In the following program:
#include
double f(bool t) {
double b = 1.0;
constexpr double a = std::numeric_limits::infinity();
return t ? b : a;
}
when invoked as:
clang-tidy --checks='*' test.cc
the following warning is reported:
test.cc:6:18: warning: narrowing conversion from constant 'double' to 'double' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions]
return t ? b : a;
^
The text was updated successfully, but these errors were encountered: