clang-tools 22.0.0git
TooSmallLoopVariableCheck.cpp File Reference
#include "TooSmallLoopVariableCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"

Go to the source code of this file.

Namespaces

namespace  clang
 ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
namespace  clang::tidy
namespace  clang::tidy::bugprone

Functions

static MagnitudeBits clang::tidy::bugprone::calcMagnitudeBits (const ASTContext &Context, const QualType &IntExprType, const Expr *IntExpr)
 Returns the magnitude bits of an integer type.
static MagnitudeBits clang::tidy::bugprone::calcUpperBoundMagnitudeBits (const ASTContext &Context, const Expr *UpperBound, const QualType &UpperBoundType)
 Calculate the upper bound expression's magnitude bits, but ignore constant like values to reduce false positives.
static std::string clang::tidy::bugprone::formatIntegralType (const QualType &Type, const MagnitudeBits &Info)

Variables

static constexpr llvm::StringLiteral clang::tidy::bugprone::LoopName
static constexpr llvm::StringLiteral clang::tidy::bugprone::LoopVarName
static constexpr llvm::StringLiteral clang::tidy::bugprone::LoopVarCastName
static constexpr llvm::StringLiteral clang::tidy::bugprone::LoopUpperBoundName
static constexpr llvm::StringLiteral clang::tidy::bugprone::LoopIncrementName