clang  14.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, IntArgBeg = dArg, IntArgEnd = iArg, 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
 
Optional< ConversionSpecifiergetStandardSpecifier () const
 

Protected Attributes

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

Detailed Description

Definition at line 121 of file FormatString.h.

Member Enumeration Documentation

◆ Kind

Enumerator
InvalidSpecifier 
cArg 
dArg 
DArg 
iArg 
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 123 of file FormatString.h.

Constructor & Destructor Documentation

◆ ConversionSpecifier() [1/2]

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

Definition at line 192 of file FormatString.h.

◆ ConversionSpecifier() [2/2]

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

Definition at line 196 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 203 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 223 of file FormatString.h.

References EndScanList, and Position.

Referenced by getCharacters().

◆ getStandardSpecifier()

Optional< ConversionSpecifier > ConversionSpecifier::getStandardSpecifier ( ) const

Definition at line 672 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 199 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 228 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 230 of file FormatString.h.

References kind, UIntArgBeg, and UIntArgEnd.

◆ setEndScanList()

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

Definition at line 226 of file FormatString.h.

References EndScanList.

Referenced by ParseScanList().

◆ setKind()

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

Definition at line 222 of file FormatString.h.

References kind.

Referenced by getStandardSpecifier().

◆ toString()

const char * ConversionSpecifier::toString ( ) const

Member Data Documentation

◆ EndScanList

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

Definition at line 245 of file FormatString.h.

Referenced by getLength(), and setEndScanList().

◆ IsPrintf

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

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

Referenced by getLength(), and getStart().


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