clang-tools 22.0.0git
clang::tidy::bugprone::IntegerDivisionCheck Class Reference

Finds cases where integer division in a floating point context is likely to cause unintended loss of precision. More...

#include <IntegerDivisionCheck.h>

Inheritance diagram for clang::tidy::bugprone::IntegerDivisionCheck:
[legend]

Public Member Functions

 IntegerDivisionCheck (StringRef Name, ClangTidyContext *Context)
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override

Detailed Description

Finds cases where integer division in a floating point context is likely to cause unintended loss of precision.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/integer-division.html

Definition at line 21 of file IntegerDivisionCheck.h.

Constructor & Destructor Documentation

◆ IntegerDivisionCheck()

clang::tidy::bugprone::IntegerDivisionCheck::IntegerDivisionCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 23 of file IntegerDivisionCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::bugprone::IntegerDivisionCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 43 of file IntegerDivisionCheck.cpp.

◆ registerMatchers()

void clang::tidy::bugprone::IntegerDivisionCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 16 of file IntegerDivisionCheck.cpp.


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