clang 17.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]
Collaboration diagram for clang::analyze_format_string::ConversionSpecifier:
Collaboration 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 , 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
 
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 
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 197 of file FormatString.h.

◆ ConversionSpecifier() [2/2]

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

Definition at line 201 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 208 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 228 of file FormatString.h.

References EndScanList, and Position.

Referenced by getCharacters().

◆ getStandardSpecifier()

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

Definition at line 739 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 204 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

◆ isIntArg()

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

Definition at line 233 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 235 of file FormatString.h.

References kind, UIntArgBeg, and UIntArgEnd.

◆ setEndScanList()

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

Definition at line 231 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 250 of file FormatString.h.

Referenced by getLength(), and setEndScanList().

◆ IsPrintf

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

Definition at line 248 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 249 of file FormatString.h.

Referenced by getLength(), and getStart().


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