clang-tools 22.0.0git
|
Finds and fixes absl::Time subtraction expressions to do subtraction in the time domain instead of the numeric domain. More...
#include <TimeSubtractionCheck.h>
Public Member Functions | |
TimeSubtractionCheck (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 |
Finds and fixes absl::Time subtraction expressions to do subtraction in the time domain instead of the numeric domain.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/abseil/time-subtraction.html
Definition at line 21 of file TimeSubtractionCheck.h.
|
inline |
Definition at line 23 of file TimeSubtractionCheck.h.
|
override |
Definition at line 128 of file TimeSubtractionCheck.cpp.
References clang::tidy::abseil::getDurationFactoryForScale(), clang::tidy::abseil::getDurationInverseForScale(), clang::tidy::abseil::getScaleForTimeInverse(), clang::tidy::abseil::insideMacroDefinition(), clang::tidy::abseil::parensRequired(), and clang::tidy::abseil::rewriteExprFromNumberToTime().
|
inlineoverride |
Definition at line 25 of file TimeSubtractionCheck.h.
|
override |
Definition at line 93 of file TimeSubtractionCheck.cpp.
References clang::tidy::abseil::getDurationFactoryForScale(), and clang::tidy::abseil::getScaleForTimeInverse().