clang 22.0.0git
|
Classes | |
struct | LibcFunNamePrefixSuffixParser |
Functions | |
static bool | isNullTermPointer (const Expr *Ptr) |
static bool | hasUnsafeFormatOrSArg (const CallExpr *Call, const Expr *&UnsafeArg, const unsigned FmtArgIdx, ASTContext &Ctx, bool isKprintf=false) |
static bool | isPredefinedUnsafeLibcFunc (const FunctionDecl &Node) |
static bool | isUnsafeVaListPrintfFunc (const FunctionDecl &Node) |
static bool | isUnsafeSprintfFunc (const FunctionDecl &Node) |
static bool | isNormalPrintfFunc (const FunctionDecl &Node) |
static bool | hasUnsafePrintfStringArg (const CallExpr &Node, ASTContext &Ctx, MatchResult &Result, llvm::StringRef Tag) |
static bool | hasUnsafeSnprintfBuffer (const CallExpr &Node, ASTContext &Ctx) |
|
static |
Definition at line 809 of file UnsafeBufferUsage.cpp.
References LengthModifier::AsWideChar, clang::Call, clang::IntegerLiteral::Create(), clang::analyze_printf::OptionalAmount::getConstantAmount(), clang::analyze_printf::PrintfSpecifier::getConversionSpecifier(), clang::analyze_printf::OptionalAmount::getHowSpecified(), clang::analyze_format_string::ConversionSpecifier::getKind(), LengthModifier::getKind(), clang::ASTContext::getLangOpts(), clang::analyze_format_string::FormatSpecifier::getLengthModifier(), clang::analyze_format_string::FormatSpecifier::getPositionalArgIndex(), clang::analyze_printf::OptionalAmount::getPositionalArgIndex(), clang::analyze_printf::PrintfSpecifier::getPrecision(), clang::ASTContext::getSizeType(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::analyze_printf::OptionalAmount::hasDataArgument(), clang::Expr::IgnoreParenImpCasts(), isNullTermPointer(), isPtrBufferSafe(), clang::analyze_format_string::ParsePrintfString(), and clang::analyze_format_string::ConversionSpecifier::sArg.
Referenced by hasUnsafePrintfStringArg().
|
static |
Definition at line 1113 of file UnsafeBufferUsage.cpp.
References clang::CallExpr::arguments(), clang::Type::castAs(), clang::DynTypedNode::create(), clang::QualType::getCanonicalType(), clang::CallExpr::getDirectCallee(), clang::ASTContext::getFILEType(), clang::NamedDecl::getIdentifier(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), getPointeeType(), clang::ValueDecl::getType(), hasUnsafeFormatOrSArg(), hasUnsafePrintfStringArg(), clang::QualType::isConstQualified(), clang::Type::isIntegerType(), clang::QualType::isNull(), isNullTermPointer(), and clang::Type::isPointerType().
Referenced by hasUnsafePrintfStringArg().
|
static |
Definition at line 1188 of file UnsafeBufferUsage.cpp.
References clang::Type::castAs(), clang::CallExpr::getArg(), clang::CallExpr::getDirectCallee(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), getPointeeType(), clang::Expr::getType(), clang::ValueDecl::getType(), hasUnsafeSnprintfBuffer(), clang::Type::isAnyCharacterType(), clang::QualType::isConstQualified(), clang::Type::isPointerType(), and isPtrBufferSafe().
Referenced by hasUnsafeSnprintfBuffer().
|
static |
Definition at line 1089 of file UnsafeBufferUsage.cpp.
References clang::FunctionDecl::getBuiltinID(), clang::NamedDecl::getIdentifier(), isNormalPrintfFunc(), and libc_func_matchers::LibcFunNamePrefixSuffixParser::matchName().
Referenced by isNormalPrintfFunc().
Definition at line 785 of file UnsafeBufferUsage.cpp.
References clang::CXXRecordDecl::getCanonicalDecl(), clang::NamedDecl::getIdentifier(), clang::NamedDecl::getName(), clang::Expr::IgnoreParenImpCasts(), clang::isa(), and clang::Decl::isInStdNamespace().
Referenced by hasUnsafeFormatOrSArg(), and hasUnsafePrintfStringArg().
|
static |
Definition at line 942 of file UnsafeBufferUsage.cpp.
References clang::FunctionDecl::getBuiltinID(), clang::NamedDecl::getIdentifier(), isPredefinedUnsafeLibcFunc(), and libc_func_matchers::LibcFunNamePrefixSuffixParser::matchName().
Referenced by isPredefinedUnsafeLibcFunc().
|
static |
Definition at line 1065 of file UnsafeBufferUsage.cpp.
References clang::FunctionDecl::getBuiltinID(), clang::NamedDecl::getIdentifier(), isUnsafeSprintfFunc(), and libc_func_matchers::LibcFunNamePrefixSuffixParser::matchName().
Referenced by isUnsafeSprintfFunc().
|
static |
Definition at line 1049 of file UnsafeBufferUsage.cpp.
References clang::FunctionDecl::getBuiltinID(), clang::NamedDecl::getIdentifier(), isUnsafeVaListPrintfFunc(), and libc_func_matchers::LibcFunNamePrefixSuffixParser::matchName().
Referenced by isUnsafeVaListPrintfFunc().