Finds constants and function calls to math functions that can be replaced with c++20's mathematical constants from the numbers header and offers fix-it hints.
More...
#include <UseStdNumbersCheck.h>
Finds constants and function calls to math functions that can be replaced with c++20's mathematical constants from the numbers header and offers fix-it hints.
Does not match the use of variables with that value, and instead, offers a replacement at the definition of those variables.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-std-numbers.html
Definition at line 25 of file UseStdNumbersCheck.h.
◆ UseStdNumbersCheck()
clang::tidy::modernize::UseStdNumbersCheck::UseStdNumbersCheck |
( |
StringRef | Name, |
|
|
ClangTidyContext * | Context ) |
◆ check()
void clang::tidy::modernize::UseStdNumbersCheck::check |
( |
const ast_matchers::MatchFinder::MatchResult & | Result | ) |
|
|
override |
◆ getCheckTraversalKind()
std::optional< TraversalKind > clang::tidy::modernize::UseStdNumbersCheck::getCheckTraversalKind |
( |
| ) |
const |
|
inlineoverride |
◆ isLanguageVersionSupported()
bool clang::tidy::modernize::UseStdNumbersCheck::isLanguageVersionSupported |
( |
const LangOptions & | LangOpts | ) |
const |
|
inlineoverride |
◆ registerMatchers()
void clang::tidy::modernize::UseStdNumbersCheck::registerMatchers |
( |
ast_matchers::MatchFinder * | Finder | ) |
|
|
override |
◆ registerPPCallbacks()
void clang::tidy::modernize::UseStdNumbersCheck::registerPPCallbacks |
( |
const SourceManager & | SM, |
|
|
Preprocessor * | PP, |
|
|
Preprocessor * | ModuleExpanderPP ) |
|
override |
◆ storeOptions()
The documentation for this class was generated from the following files: