clang 20.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) |
AST_MATCHER (FunctionDecl, isPredefinedUnsafeLibcFunc) | |
AST_MATCHER (FunctionDecl, isUnsafeVaListPrintfFunc) | |
AST_MATCHER (FunctionDecl, isUnsafeSprintfFunc) | |
AST_MATCHER (FunctionDecl, isNormalPrintfFunc) | |
AST_MATCHER_P (CallExpr, hasUnsafePrintfStringArg, clang::ast_matchers::internal::Matcher< Expr >, UnsafeStringArgMatcher) | |
AST_MATCHER (CallExpr, hasUnsafeSnprintfBuffer) | |
clang::ast_matchers::libc_func_matchers::AST_MATCHER | ( | CallExpr | , |
hasUnsafeSnprintfBuffer | |||
) |
Definition at line 867 of file UnsafeBufferUsage.cpp.
References clang::Type::castAs(), clang::ASTContext::getAsConstantArrayType(), clang::APValue::getInt(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), getPointeeType(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::QualType::isConstQualified(), clang::Type::isPointerType(), Node, and clang::Expr::EvalResult::Val.
clang::ast_matchers::libc_func_matchers::AST_MATCHER | ( | FunctionDecl | , |
isNormalPrintfFunc | |||
) |
Definition at line 761 of file UnsafeBufferUsage.cpp.
References clang::ast_matchers::libc_func_matchers::LibcFunNamePrefixSuffixParser::matchName(), and Node.
clang::ast_matchers::libc_func_matchers::AST_MATCHER | ( | FunctionDecl | , |
isPredefinedUnsafeLibcFunc | |||
) |
Definition at line 614 of file UnsafeBufferUsage.cpp.
References clang::ast_matchers::libc_func_matchers::LibcFunNamePrefixSuffixParser::matchName(), and Node.
clang::ast_matchers::libc_func_matchers::AST_MATCHER | ( | FunctionDecl | , |
isUnsafeSprintfFunc | |||
) |
Definition at line 737 of file UnsafeBufferUsage.cpp.
References clang::ast_matchers::libc_func_matchers::LibcFunNamePrefixSuffixParser::matchName(), and Node.
clang::ast_matchers::libc_func_matchers::AST_MATCHER | ( | FunctionDecl | , |
isUnsafeVaListPrintfFunc | |||
) |
Definition at line 721 of file UnsafeBufferUsage.cpp.
References clang::ast_matchers::libc_func_matchers::LibcFunNamePrefixSuffixParser::matchName(), and Node.
clang::ast_matchers::libc_func_matchers::AST_MATCHER_P | ( | CallExpr | , |
hasUnsafePrintfStringArg | , | ||
clang::ast_matchers::internal::Matcher< Expr > | , | ||
UnsafeStringArgMatcher | |||
) |
Definition at line 785 of file UnsafeBufferUsage.cpp.
References clang::Type::castAs(), clang::QualType::getCanonicalType(), clang::ASTContext::getFILEType(), clang::NamedDecl::getIdentifier(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), getPointeeType(), clang::ValueDecl::getType(), hasUnsafeFormatOrSArg(), clang::QualType::isConstQualified(), clang::Type::isIntegerType(), clang::QualType::isNull(), isNullTermPointer(), clang::Type::isPointerType(), and Node.
|
static |
Definition at line 539 of file UnsafeBufferUsage.cpp.
References clang::Call, clang::ASTContext::getLangOpts(), clang::ASTContext::getTargetInfo(), clang::Expr::IgnoreParenImpCasts(), isNullTermPointer(), and clang::analyze_format_string::ParsePrintfString().
Referenced by AST_MATCHER_P().
Definition at line 515 of file UnsafeBufferUsage.cpp.
References clang::CXXRecordDecl::getCanonicalDecl(), clang::NamedDecl::getName(), clang::Expr::IgnoreParenImpCasts(), and clang::Decl::isInStdNamespace().
Referenced by AST_MATCHER_P(), and hasUnsafeFormatOrSArg().