|
clang-tools 23.0.0git
|
Finds calls to C math library functions with implicit float to double promotions. More...
#include <TypePromotionInMathFnCheck.h>
Public Member Functions | |
| TypePromotionInMathFnCheck (StringRef Name, ClangTidyContext *Context) | |
| void | registerPPCallbacks (const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) override |
| void | storeOptions (ClangTidyOptions::OptionMap &Opts) override |
| void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
| void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
Finds calls to C math library functions with implicit float to double promotions.
For example, warns on ::sin(0.f), because this function's parameter is a double. You probably meant to call std::sin(0.f) (in C++), or sinf(0.f) (in C).
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/performance/type-promotion-in-math-fn.html
Definition at line 26 of file TypePromotionInMathFnCheck.h.
| clang::tidy::performance::TypePromotionInMathFnCheck::TypePromotionInMathFnCheck | ( | StringRef | Name, |
| ClangTidyContext * | Context ) |
Definition at line 28 of file TypePromotionInMathFnCheck.cpp.
|
override |
Definition at line 153 of file TypePromotionInMathFnCheck.cpp.
|
override |
Definition at line 45 of file TypePromotionInMathFnCheck.cpp.
|
override |
Definition at line 35 of file TypePromotionInMathFnCheck.cpp.
|
override |
Definition at line 40 of file TypePromotionInMathFnCheck.cpp.