clang-tools 22.0.0git
clang::tidy::abseil::TimeSubtractionCheck Class Reference

Finds and fixes absl::Time subtraction expressions to do subtraction in the time domain instead of the numeric domain. More...

#include <TimeSubtractionCheck.h>

Inheritance diagram for clang::tidy::abseil::TimeSubtractionCheck:
[legend]

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

Detailed Description

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.

Constructor & Destructor Documentation

◆ TimeSubtractionCheck()

clang::tidy::abseil::TimeSubtractionCheck::TimeSubtractionCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 23 of file TimeSubtractionCheck.h.

Member Function Documentation

◆ check()

◆ isLanguageVersionSupported()

bool clang::tidy::abseil::TimeSubtractionCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 25 of file TimeSubtractionCheck.h.

◆ registerMatchers()

void clang::tidy::abseil::TimeSubtractionCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

The documentation for this class was generated from the following files: