clang 24.0.0git
clang::analyze_format_string Namespace Reference

Common components of both fprintf and fscanf format strings. More...

Classes

class  ArgType
class  ConversionSpecifier
class  FormatSpecifier
class  FormatStringHandler
class  FormatStringParser
class  LengthModifier
 Represents the length modifier in a format string in scanf/printf. More...
class  OptionalAmount
class  OptionalFlag
 Class representing optional flags with location and representation information. More...
class  SpecifierResult

Enumerations

enum  PositionContext { FieldWidthPos = 0 , PrecisionPos = 1 }

Functions

bool ParsePrintfString (FormatStringHandler &H, const char *beg, const char *end, const LangOptions &LO, const TargetInfo &Target, bool isFreeBSDKPrintf)
bool ParseFormatStringHasSArg (const char *beg, const char *end, const LangOptions &LO, const TargetInfo &Target)
bool ParseScanfString (FormatStringHandler &H, const char *beg, const char *end, const LangOptions &LO, const TargetInfo &Target)
bool parseFormatStringHasFormattingSpecifiers (const char *Begin, const char *End, const LangOptions &LO, const TargetInfo &Target)
 Return true if the given string has at least one formatting specifier.

Detailed Description

Common components of both fprintf and fscanf format strings.

Enumeration Type Documentation

◆ PositionContext

Enumerator
FieldWidthPos 
PrecisionPos 

Definition at line 730 of file FormatString.h.

Function Documentation

◆ parseFormatStringHasFormattingSpecifiers()

bool clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers ( const char * Begin,
const char * End,
const LangOptions & LO,
const TargetInfo & Target )

Return true if the given string has at least one formatting specifier.

Definition at line 553 of file PrintfFormatString.cpp.

References clang::analyze_format_string::SpecifierResult< T >::hasValue(), clang::analyze_format_string::SpecifierResult< T >::shouldStop(), and clang::Target.

Referenced by CheckFormatString().

◆ ParseFormatStringHasSArg()

◆ ParsePrintfString()

◆ ParseScanfString()