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

#include "clang/Analysis/Analyses/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.

◆ 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.

◆ getStandardSpecifier()

Optional< ConversionSpecifier > ConversionSpecifier::getStandardSpecifier ( ) const

Definition at line 624 of file FormatString.cpp.

References getKind(), and setKind().

◆ getStart()

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

Definition at line 199 of file FormatString.h.

◆ isAnyIntArg()

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

Definition at line 231 of file FormatString.h.

◆ 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.

Referenced by clang::analyze_printf::PrintfSpecifier::getArgType().

◆ 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.

Referenced by clang::analyze_printf::PrintfSpecifier::getArgType().

◆ setEndScanList()

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

Definition at line 226 of file FormatString.h.

◆ setKind()

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

Definition at line 222 of file FormatString.h.

Referenced by getStandardSpecifier().

◆ toString()

const char * ConversionSpecifier::toString ( ) const

Definition at line 572 of file FormatString.cpp.

Member Data Documentation

◆ EndScanList

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

Definition at line 245 of file FormatString.h.

◆ IsPrintf

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

Definition at line 243 of file FormatString.h.

◆ kind

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

Definition at line 246 of file FormatString.h.

◆ Position

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

Definition at line 244 of file FormatString.h.


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