clang 24.0.0git
clang::analyze_format_string::FormatStringParser Class Reference

#include "/work/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/AST/FormatStringParsing.h"

Protected Member Functions

 FormatStringParser (FormatStringHandler &H, const LangOptions &LO, const TargetInfo &Target, bool IsScanf)
OptionalAmount parseAmount (const char *&Beg, const char *E) const
OptionalAmount parseNonPositionAmount (const char *&Beg, const char *E, unsigned &argIndex) const
OptionalAmount parsePositionAmount (const char *Start, const char *&Beg, const char *E, PositionContext p) const
bool parseFieldWidth (FormatSpecifier &CS, const char *Start, const char *&Beg, const char *E, unsigned *argIndex) const
bool parseArgPosition (FormatSpecifier &CS, const char *Start, const char *&Beg, const char *E) const
bool parseVectorModifier (FormatSpecifier &FS, const char *&Beg, const char *E) const
bool parseLengthModifier (FormatSpecifier &FS, const char *&Beg, const char *E) const
 Returns true if a LengthModifier was parsed and installed in the FormatSpecifier& argument, and false otherwise.
bool parseUTF8InvalidSpecifier (const char *SpecifierBegin, const char *FmtStrEnd, unsigned &Len) const
 Returns true if the invalid specifier in SpecifierBegin is a UTF-8 string; check that it won't go further than FmtStrEnd and write up the total size in Len.

Protected Attributes

FormatStringHandler & H
const LangOptions & LO
const TargetInfo & Target
bool IsScanf

Detailed Description

Definition at line 38 of file FormatStringParsing.h.

Constructor & Destructor Documentation

◆ FormatStringParser()

clang::analyze_format_string::FormatStringParser::FormatStringParser ( FormatStringHandler & H,
const LangOptions & LO,
const TargetInfo & Target,
bool IsScanf )
inlineprotected

Definition at line 40 of file FormatStringParsing.h.

References H, IsScanf, LO, and Target.

Member Function Documentation

◆ parseAmount()

OptionalAmount FormatStringParser::parseAmount ( const char *& Beg,
const char * E ) const
protected

◆ parseArgPosition()

◆ parseFieldWidth()

bool FormatStringParser::parseFieldWidth ( FormatSpecifier & CS,
const char * Start,
const char *& Beg,
const char * E,
unsigned * argIndex ) const
protected

◆ parseLengthModifier()

bool FormatStringParser::parseLengthModifier ( FormatSpecifier & FS,
const char *& Beg,
const char * E ) const
protected

Returns true if a LengthModifier was parsed and installed in the FormatSpecifier& argument, and false otherwise.

Definition at line 213 of file FormatString.cpp.

References clang::analyze_format_string::LengthModifier::AsAllocate, clang::analyze_format_string::LengthModifier::AsChar, clang::analyze_format_string::LengthModifier::AsDecimal128, clang::analyze_format_string::LengthModifier::AsDecimal32, clang::analyze_format_string::LengthModifier::AsDecimal64, clang::analyze_format_string::LengthModifier::AsFastIntN, clang::analyze_format_string::LengthModifier::AsInt32, clang::analyze_format_string::LengthModifier::AsInt3264, clang::analyze_format_string::LengthModifier::AsInt64, clang::analyze_format_string::LengthModifier::AsIntMax, clang::analyze_format_string::LengthModifier::AsIntN, clang::analyze_format_string::LengthModifier::AsLong, clang::analyze_format_string::LengthModifier::AsLongDouble, clang::analyze_format_string::LengthModifier::AsLongLong, clang::analyze_format_string::LengthModifier::AsMAllocate, clang::analyze_format_string::LengthModifier::AsPtrDiff, clang::analyze_format_string::LengthModifier::AsQuad, clang::analyze_format_string::LengthModifier::AsShort, clang::analyze_format_string::LengthModifier::AsShortLong, clang::analyze_format_string::LengthModifier::AsSizeT, clang::analyze_format_string::LengthModifier::AsWide, IsScanf, LO, clang::analyze_format_string::LengthModifier::None, and clang::analyze_format_string::FormatSpecifier::setLengthModifier().

◆ parseNonPositionAmount()

OptionalAmount FormatStringParser::parseNonPositionAmount ( const char *& Beg,
const char * E,
unsigned & argIndex ) const
protected

Definition at line 81 of file FormatString.cpp.

References clang::analyze_format_string::OptionalAmount::Arg, and parseAmount().

Referenced by parseFieldWidth().

◆ parsePositionAmount()

◆ parseUTF8InvalidSpecifier()

bool FormatStringParser::parseUTF8InvalidSpecifier ( const char * SpecifierBegin,
const char * FmtStrEnd,
unsigned & Len ) const
protected

Returns true if the invalid specifier in SpecifierBegin is a UTF-8 string; check that it won't go further than FmtStrEnd and write up the total size in Len.

Definition at line 351 of file FormatString.cpp.

◆ parseVectorModifier()

bool FormatStringParser::parseVectorModifier ( FormatSpecifier & FS,
const char *& Beg,
const char * E ) const
protected

Member Data Documentation

◆ H

FormatStringHandler& clang::analyze_format_string::FormatStringParser::H
protected

◆ IsScanf

bool clang::analyze_format_string::FormatStringParser::IsScanf
protected

Definition at line 75 of file FormatStringParsing.h.

Referenced by FormatStringParser(), and parseLengthModifier().

◆ LO

const LangOptions& clang::analyze_format_string::FormatStringParser::LO
protected

◆ Target

const TargetInfo& clang::analyze_format_string::FormatStringParser::Target
protected

Definition at line 74 of file FormatStringParsing.h.

Referenced by FormatStringParser().


The documentation for this class was generated from the following files: