clang-tools 20.0.0git
|
#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, const ASTContext &Ctx) |
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, const ASTContext &Ctx) |
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, const ASTContext &Ctx) |
Checks if multilevel pointers' qualifiers compatibility continues on the current pointer level. | |
static bool | clang::tidy::readability::arePointerTypesCompatible (QualType ArgType, QualType ParamType, bool IsParamContinuouslyConst, const ASTContext &Ctx) |
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 |
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.
const bool Enabled |
Whether the heuristic is to be enabled by default.
Definition at line 25 of file SuspiciousCallArgumentCheck.cpp.
Referenced by main(), clang::tidy::bugprone::filter::SimilarlyUsedParameterPairSuppressor::operator()(), clang::tidy::bugprone::filter::SimilarlyUsedParameterPairSuppressor::SimilarlyUsedParameterPairSuppressor(), and clang::tidy::readability::SuspiciousCallArgumentCheck::SuspiciousCallArgumentCheck().
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.
|
staticconstexpr |
Definition at line 71 of file SuspiciousCallArgumentCheck.cpp.