clang-tools 22.0.0git
|
This check finds cases where the incorrect Duration factory function is being used by looking for scaling constants inside the factory argument and suggesting a more appropriate factory. More...
#include <DurationFactoryScaleCheck.h>
Public Member Functions | |
DurationFactoryScaleCheck (StringRef Name, ClangTidyContext *Context) | |
bool | isLanguageVersionSupported (const LangOptions &LangOpts) const override |
void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
This check finds cases where the incorrect Duration factory function is being used by looking for scaling constants inside the factory argument and suggesting a more appropriate factory.
It also looks for the special case of zero and suggests ZeroDuration().
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/abseil/duration-factory-scale.html
Definition at line 23 of file DurationFactoryScaleCheck.h.
|
inline |
Definition at line 25 of file DurationFactoryScaleCheck.h.
|
override |
|
inlineoverride |
Definition at line 27 of file DurationFactoryScaleCheck.h.
|
override |
Definition at line 112 of file DurationFactoryScaleCheck.cpp.