clang 20.0.0git
Public Types | Public Member Functions | Protected Attributes | List of all members
clang::analyze_format_string::ConversionSpecifier Class Reference

#include "clang/AST/FormatString.h"

Inheritance diagram for clang::analyze_format_string::ConversionSpecifier:
Inheritance graph
[legend]

Public Types

enum  Kind {
  InvalidSpecifier = 0 , cArg , dArg , DArg ,
  iArg , bArg , BArg , IntArgBeg = dArg ,
  IntArgEnd = BArg , oArg , OArg , uArg ,
  UArg , xArg , XArg , UIntArgBeg = oArg ,
  UIntArgEnd = XArg , fArg , FArg , eArg ,
  EArg , gArg , GArg , aArg ,
  AArg , DoubleArgBeg = fArg , DoubleArgEnd = AArg , sArg ,
  pArg , nArg , PercentArg , CArg ,
  SArg , PArg , ZArg , kArg ,
  KArg , rArg , RArg , FixedPointArgBeg = kArg ,
  FixedPointArgEnd = RArg , ObjCObjArg , ObjCBeg = ObjCObjArg , ObjCEnd = ObjCObjArg ,
  FreeBSDbArg , FreeBSDDArg , FreeBSDrArg , FreeBSDyArg ,
  PrintErrno , PrintfConvBeg = ObjCObjArg , PrintfConvEnd = PrintErrno , ScanListArg ,
  ScanfConvBeg = ScanListArg , ScanfConvEnd = ScanListArg
}
 

Public Member Functions

 ConversionSpecifier (bool isPrintf=true)
 
 ConversionSpecifier (bool isPrintf, const char *pos, Kind k)
 
const char * getStart () const
 
StringRef getCharacters () const
 
bool consumesDataArgument () const
 
Kind getKind () const
 
void setKind (Kind k)
 
unsigned getLength () const
 
void setEndScanList (const char *pos)
 
bool isIntArg () const
 
bool isUIntArg () const
 
bool isAnyIntArg () const
 
bool isDoubleArg () const
 
bool isFixedPointArg () const
 
const char * toString () const
 
bool isPrintfKind () const
 
std::optional< ConversionSpecifiergetStandardSpecifier () const
 

Protected Attributes

bool IsPrintf
 
const char * Position
 
const char * EndScanList
 
Kind kind
 

Detailed Description

Definition at line 122 of file FormatString.h.

Member Enumeration Documentation

◆ Kind

Enumerator
InvalidSpecifier 
cArg 
dArg 
DArg 
iArg 
bArg 
BArg 
IntArgBeg 
IntArgEnd 
oArg 
OArg 
uArg 
UArg 
xArg 
XArg 
UIntArgBeg 
UIntArgEnd 
fArg 
FArg 
eArg 
EArg 
gArg 
GArg 
aArg 
AArg 
DoubleArgBeg 
DoubleArgEnd 
sArg 
pArg 
nArg 
PercentArg 
CArg 
SArg 
PArg 
ZArg 
kArg 
KArg 
rArg 
RArg 
FixedPointArgBeg 
FixedPointArgEnd 
ObjCObjArg 
ObjCBeg 
ObjCEnd 
FreeBSDbArg 
FreeBSDDArg 
FreeBSDrArg 
FreeBSDyArg 
PrintErrno 
PrintfConvBeg 
PrintfConvEnd 
ScanListArg 
ScanfConvBeg 
ScanfConvEnd 

Definition at line 124 of file FormatString.h.

Constructor & Destructor Documentation

◆ ConversionSpecifier() [1/2]

clang::analyze_format_string::ConversionSpecifier::ConversionSpecifier ( bool  isPrintf = true)
inline

Definition at line 205 of file FormatString.h.

◆ ConversionSpecifier() [2/2]

clang::analyze_format_string::ConversionSpecifier::ConversionSpecifier ( bool  isPrintf,
const char *  pos,
Kind  k 
)
inline

Definition at line 209 of file FormatString.h.

Member Function Documentation

◆ consumesDataArgument()

bool clang::analyze_format_string::ConversionSpecifier::consumesDataArgument ( ) const
inline

◆ getCharacters()

StringRef clang::analyze_format_string::ConversionSpecifier::getCharacters ( ) const
inline

Definition at line 216 of file FormatString.h.

References getLength(), and getStart().

◆ getKind()

Kind clang::analyze_format_string::ConversionSpecifier::getKind ( ) const
inline

◆ getLength()

unsigned clang::analyze_format_string::ConversionSpecifier::getLength ( ) const
inline

Definition at line 236 of file FormatString.h.

References EndScanList, and Position.

Referenced by getCharacters().

◆ getStandardSpecifier()

std::optional< ConversionSpecifier > ConversionSpecifier::getStandardSpecifier ( ) const

Definition at line 792 of file FormatString.cpp.

References dArg, DArg, getKind(), oArg, OArg, setKind(), uArg, and UArg.

◆ getStart()

const char * clang::analyze_format_string::ConversionSpecifier::getStart ( ) const
inline

Definition at line 212 of file FormatString.h.

References Position.

Referenced by getCharacters().

◆ isAnyIntArg()

bool clang::analyze_format_string::ConversionSpecifier::isAnyIntArg ( ) const
inline

◆ isDoubleArg()

bool clang::analyze_format_string::ConversionSpecifier::isDoubleArg ( ) const
inline

◆ isFixedPointArg()

bool clang::analyze_format_string::ConversionSpecifier::isFixedPointArg ( ) const
inline

◆ isIntArg()

bool clang::analyze_format_string::ConversionSpecifier::isIntArg ( ) const
inline

Definition at line 241 of file FormatString.h.

References FreeBSDrArg, FreeBSDyArg, IntArgBeg, IntArgEnd, and kind.

◆ isPrintfKind()

bool clang::analyze_format_string::ConversionSpecifier::isPrintfKind ( ) const
inline

◆ isUIntArg()

bool clang::analyze_format_string::ConversionSpecifier::isUIntArg ( ) const
inline

Definition at line 243 of file FormatString.h.

References kind, UIntArgBeg, and UIntArgEnd.

◆ setEndScanList()

void clang::analyze_format_string::ConversionSpecifier::setEndScanList ( const char *  pos)
inline

Definition at line 239 of file FormatString.h.

References EndScanList.

Referenced by ParsePrintfSpecifier(), ParseScanfSpecifier(), and ParseScanList().

◆ setKind()

void clang::analyze_format_string::ConversionSpecifier::setKind ( Kind  k)
inline

◆ toString()

const char * ConversionSpecifier::toString ( ) const

Member Data Documentation

◆ EndScanList

const char* clang::analyze_format_string::ConversionSpecifier::EndScanList
protected

Definition at line 261 of file FormatString.h.

Referenced by getLength(), and setEndScanList().

◆ IsPrintf

bool clang::analyze_format_string::ConversionSpecifier::IsPrintf
protected

Definition at line 259 of file FormatString.h.

Referenced by consumesDataArgument(), and isPrintfKind().

◆ kind

Kind clang::analyze_format_string::ConversionSpecifier::kind
protected

◆ Position

const char* clang::analyze_format_string::ConversionSpecifier::Position
protected

Definition at line 260 of file FormatString.h.

Referenced by getLength(), and getStart().


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