clang-tools 20.0.0git
Namespaces | Functions | Variables
SuspiciousCallArgumentCheck.cpp File Reference
#include "SuspiciousCallArgumentCheck.h"
#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Type.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include <optional>
#include <sstream>

Go to the source code of this file.

Namespaces

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

Functions

static double clang::tidy::readability::percentage (double X, double Y)
 Returns how many % X is of Y.
 
static bool clang::tidy::readability::applyEqualityHeuristic (StringRef Arg, StringRef Param)
 
static bool clang::tidy::readability::applyAbbreviationHeuristic (const llvm::StringMap< std::string > &AbbreviationDictionary, StringRef Arg, StringRef Param)
 
static bool clang::tidy::readability::applyPrefixHeuristic (StringRef Arg, StringRef Param, int8_t Threshold)
 Check whether the shorter String is a prefix of the longer String.
 
static bool clang::tidy::readability::applySuffixHeuristic (StringRef Arg, StringRef Param, int8_t Threshold)
 Check whether the shorter String is a suffix of the longer String.
 
static bool clang::tidy::readability::applySubstringHeuristic (StringRef Arg, StringRef Param, int8_t Threshold)
 
static bool clang::tidy::readability::applyLevenshteinHeuristic (StringRef Arg, StringRef Param, int8_t Threshold)
 
static bool clang::tidy::readability::applyJaroWinklerHeuristic (StringRef Arg, StringRef Param, int8_t Threshold)
 
static bool clang::tidy::readability::applyDiceHeuristic (StringRef Arg, StringRef Param, int8_t Threshold)
 
static bool clang::tidy::readability::areRefAndQualCompatible (QualType ArgType, QualType ParamType)
 Checks if ArgType binds to ParamType regarding reference-ness and cv-qualifiers.
 
static bool clang::tidy::readability::isPointerOrArray (QualType TypeToCheck)
 
static bool clang::tidy::readability::isCompatibleWithArrayReference (QualType ArgType, QualType ParamType)
 Checks whether ArgType is an array type identical to ParamType's array type.
 
static QualType clang::tidy::readability::convertToPointeeOrArrayElementQualType (QualType TypeToConvert)
 
static bool clang::tidy::readability::arePointersStillQualCompatible (QualType ArgType, QualType ParamType, bool &IsParamContinuouslyConst)
 Checks if multilevel pointers' qualifiers compatibility continues on the current pointer level.
 
static bool clang::tidy::readability::arePointerTypesCompatible (QualType ArgType, QualType ParamType, bool IsParamContinuouslyConst)
 Checks whether multilevel pointers are compatible in terms of levels, qualifiers and pointee type.
 
static bool clang::tidy::readability::areTypesCompatible (QualType ArgType, QualType ParamType, const ASTContext &Ctx)
 Checks whether ArgType converts implicitly to ParamType.
 
static bool clang::tidy::readability::isOverloadedUnaryOrBinarySymbolOperator (const FunctionDecl *FD)
 

Variables

static constexpr std::size_t clang::tidy::readability::DefaultMinimumIdentifierNameLength = 3
 
static constexpr StringRef clang::tidy::readability::HeuristicToString []
 
static constexpr DefaultHeuristicConfiguration clang::tidy::readability::Defaults []
 
static constexpr llvm::StringLiteral clang::tidy::readability::DefaultAbbreviations
 
static constexpr std::size_t clang::tidy::readability::SmallVectorSize
 

Variable Documentation

◆ DissimilarBelow

const int8_t DissimilarBelow

The upper bound of % of similarity the two strings might have to be considered dissimilar.

(For purposes of configuration, -1 if the heuristic is not configurable with bounds.)

Definition at line 31 of file SuspiciousCallArgumentCheck.cpp.

◆ Enabled

const bool Enabled

◆ SimilarAbove

const int8_t SimilarAbove

The lower bound of % of similarity the two string must have to be considered similar.

(For purposes of configuration, -1 if the heuristic is not configurable with bounds.)

Definition at line 37 of file SuspiciousCallArgumentCheck.cpp.

◆ Value

constexpr bool Value
staticconstexpr
Initial value:
=
!((Defaults[I].DissimilarBelow == -1) ^ (Defaults[I].SimilarAbove == -1))
const int8_t SimilarAbove
The lower bound of % of similarity the two string must have to be considered similar.

Definition at line 71 of file SuspiciousCallArgumentCheck.cpp.