clang  9.0.0svn
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
clang::analyze_format_string::FormatSpecifier Class Reference

#include "clang/AST/FormatString.h"

Inheritance diagram for clang::analyze_format_string::FormatSpecifier:
Inheritance graph
[legend]
Collaboration diagram for clang::analyze_format_string::FormatSpecifier:
Collaboration graph
[legend]

Public Member Functions

 FormatSpecifier (bool isPrintf)
 
void setLengthModifier (LengthModifier lm)
 
void setUsesPositionalArg ()
 
void setArgIndex (unsigned i)
 
unsigned getArgIndex () const
 
unsigned getPositionalArgIndex () const
 
const LengthModifiergetLengthModifier () const
 
const OptionalAmountgetFieldWidth () const
 
void setVectorNumElts (const OptionalAmount &Amt)
 
const OptionalAmountgetVectorNumElts () const
 
void setFieldWidth (const OptionalAmount &Amt)
 
bool usesPositionalArg () const
 
bool hasValidLengthModifier (const TargetInfo &Target, const LangOptions &LO) const
 
bool hasStandardLengthModifier () const
 
Optional< LengthModifiergetCorrectedLengthModifier () const
 
bool hasStandardConversionSpecifier (const LangOptions &LangOpt) const
 
bool hasStandardLengthConversionCombination () const
 

Static Public Member Functions

static bool namedTypeToLengthModifier (QualType QT, LengthModifier &LM)
 For a TypedefType QT, if it is a named integer type such as size_t, assign the appropriate value to LM and return true. More...
 

Protected Attributes

LengthModifier LM
 
OptionalAmount FieldWidth
 
ConversionSpecifier CS
 
OptionalAmount VectorNumElts
 
bool UsesPositionalArg
 Positional arguments, an IEEE extension: IEEE Std 1003.1, 2004 Edition http://www.opengroup.org/onlinepubs/009695399/functions/printf.html. More...
 
unsigned argIndex
 

Detailed Description

Definition at line 383 of file FormatString.h.

Constructor & Destructor Documentation

◆ FormatSpecifier()

clang::analyze_format_string::FormatSpecifier::FormatSpecifier ( bool  isPrintf)
inline

Definition at line 396 of file FormatString.h.

Member Function Documentation

◆ getArgIndex()

unsigned clang::analyze_format_string::FormatSpecifier::getArgIndex ( ) const
inline

Definition at line 410 of file FormatString.h.

◆ getCorrectedLengthModifier()

Optional< LengthModifier > FormatSpecifier::getCorrectedLengthModifier ( ) const

◆ getFieldWidth()

const OptionalAmount& clang::analyze_format_string::FormatSpecifier::getFieldWidth ( ) const
inline

Definition at line 422 of file FormatString.h.

◆ getLengthModifier()

const LengthModifier& clang::analyze_format_string::FormatSpecifier::getLengthModifier ( ) const
inline

Definition at line 418 of file FormatString.h.

◆ getPositionalArgIndex()

unsigned clang::analyze_format_string::FormatSpecifier::getPositionalArgIndex ( ) const
inline

Definition at line 414 of file FormatString.h.

◆ getVectorNumElts()

const OptionalAmount& clang::analyze_format_string::FormatSpecifier::getVectorNumElts ( ) const
inline

Definition at line 430 of file FormatString.h.

◆ hasStandardConversionSpecifier()

bool FormatSpecifier::hasStandardConversionSpecifier ( const LangOptions LangOpt) const

Definition at line 900 of file FormatString.cpp.

References clang::analyze_format_string::ConversionSpecifier::aArg, clang::analyze_format_string::ConversionSpecifier::AArg, clang::analyze_format_string::ConversionSpecifier::cArg, clang::analyze_format_string::ConversionSpecifier::CArg, clang::analyze_format_string::ConversionSpecifier::dArg, clang::analyze_format_string::ConversionSpecifier::DArg, clang::analyze_format_string::ConversionSpecifier::eArg, clang::analyze_format_string::ConversionSpecifier::EArg, clang::analyze_format_string::ConversionSpecifier::fArg, clang::analyze_format_string::ConversionSpecifier::FArg, clang::analyze_format_string::ConversionSpecifier::FreeBSDbArg, clang::analyze_format_string::ConversionSpecifier::FreeBSDDArg, clang::analyze_format_string::ConversionSpecifier::FreeBSDrArg, clang::analyze_format_string::ConversionSpecifier::FreeBSDyArg, clang::analyze_format_string::ConversionSpecifier::gArg, clang::analyze_format_string::ConversionSpecifier::GArg, clang::analyze_format_string::ConversionSpecifier::iArg, clang::analyze_format_string::ConversionSpecifier::InvalidSpecifier, clang::analyze_format_string::ConversionSpecifier::nArg, clang::analyze_format_string::ConversionSpecifier::oArg, clang::analyze_format_string::ConversionSpecifier::OArg, clang::analyze_format_string::ConversionSpecifier::ObjCObjArg, clang::analyze_format_string::ConversionSpecifier::pArg, clang::analyze_format_string::ConversionSpecifier::PArg, clang::analyze_format_string::ConversionSpecifier::PercentArg, clang::analyze_format_string::ConversionSpecifier::PrintErrno, clang::analyze_format_string::ConversionSpecifier::sArg, clang::analyze_format_string::ConversionSpecifier::SArg, clang::analyze_format_string::ConversionSpecifier::ScanListArg, clang::analyze_format_string::ConversionSpecifier::uArg, clang::analyze_format_string::ConversionSpecifier::UArg, clang::analyze_format_string::ConversionSpecifier::xArg, clang::analyze_format_string::ConversionSpecifier::XArg, and clang::analyze_format_string::ConversionSpecifier::ZArg.

◆ hasStandardLengthConversionCombination()

bool FormatSpecifier::hasStandardLengthConversionCombination ( ) const

◆ hasStandardLengthModifier()

bool FormatSpecifier::hasStandardLengthModifier ( ) const

◆ hasValidLengthModifier()

bool FormatSpecifier::hasValidLengthModifier ( const TargetInfo Target,
const LangOptions LO 
) const

Definition at line 716 of file FormatString.cpp.

References clang::analyze_format_string::ConversionSpecifier::aArg, clang::analyze_format_string::ConversionSpecifier::AArg, clang::analyze_format_string::LengthModifier::AsAllocate, clang::analyze_format_string::LengthModifier::AsChar, clang::analyze_format_string::LengthModifier::AsInt32, clang::analyze_format_string::LengthModifier::AsInt3264, clang::analyze_format_string::LengthModifier::AsInt64, clang::analyze_format_string::LengthModifier::AsIntMax, clang::analyze_format_string::LengthModifier::AsLong, clang::analyze_format_string::LengthModifier::AsLongDouble, clang::analyze_format_string::LengthModifier::AsLongLong, clang::analyze_format_string::LengthModifier::AsMAllocate, clang::analyze_format_string::LengthModifier::AsPtrDiff, clang::analyze_format_string::LengthModifier::AsQuad, clang::analyze_format_string::LengthModifier::AsShort, clang::analyze_format_string::LengthModifier::AsShortLong, clang::analyze_format_string::LengthModifier::AsSizeT, clang::analyze_format_string::LengthModifier::AsWide, clang::analyze_format_string::ConversionSpecifier::cArg, clang::analyze_format_string::ConversionSpecifier::CArg, clang::analyze_format_string::ConversionSpecifier::dArg, clang::analyze_format_string::ConversionSpecifier::DArg, clang::analyze_format_string::ConversionSpecifier::eArg, clang::analyze_format_string::ConversionSpecifier::EArg, clang::analyze_format_string::ConversionSpecifier::fArg, clang::analyze_format_string::ConversionSpecifier::FArg, clang::analyze_format_string::ConversionSpecifier::FreeBSDrArg, clang::analyze_format_string::ConversionSpecifier::FreeBSDyArg, clang::analyze_format_string::ConversionSpecifier::gArg, clang::analyze_format_string::ConversionSpecifier::GArg, clang::TargetInfo::getTriple(), clang::analyze_format_string::ConversionSpecifier::iArg, clang::analyze_format_string::ConversionSpecifier::nArg, clang::analyze_format_string::LengthModifier::None, clang::analyze_format_string::ConversionSpecifier::oArg, clang::analyze_format_string::ConversionSpecifier::OArg, clang::analyze_format_string::ConversionSpecifier::sArg, clang::analyze_format_string::ConversionSpecifier::SArg, clang::analyze_format_string::ConversionSpecifier::ScanListArg, clang::analyze_format_string::ConversionSpecifier::uArg, clang::analyze_format_string::ConversionSpecifier::UArg, clang::analyze_format_string::ConversionSpecifier::xArg, clang::analyze_format_string::ConversionSpecifier::XArg, and clang::analyze_format_string::ConversionSpecifier::ZArg.

◆ namedTypeToLengthModifier()

bool FormatSpecifier::namedTypeToLengthModifier ( QualType  QT,
LengthModifier LM 
)
static

◆ setArgIndex()

void clang::analyze_format_string::FormatSpecifier::setArgIndex ( unsigned  i)
inline

Definition at line 406 of file FormatString.h.

References i.

Referenced by clang::analyze_format_string::ParseArgPosition(), and ParseScanfSpecifier().

◆ setFieldWidth()

void clang::analyze_format_string::FormatSpecifier::setFieldWidth ( const OptionalAmount Amt)
inline

◆ setLengthModifier()

void clang::analyze_format_string::FormatSpecifier::setLengthModifier ( LengthModifier  lm)
inline

Definition at line 400 of file FormatString.h.

Referenced by clang::analyze_format_string::ParseLengthModifier().

◆ setUsesPositionalArg()

void clang::analyze_format_string::FormatSpecifier::setUsesPositionalArg ( )
inline

Definition at line 404 of file FormatString.h.

Referenced by clang::analyze_format_string::ParseArgPosition().

◆ setVectorNumElts()

void clang::analyze_format_string::FormatSpecifier::setVectorNumElts ( const OptionalAmount Amt)
inline

Definition at line 426 of file FormatString.h.

Referenced by clang::analyze_format_string::ParseVectorModifier().

◆ usesPositionalArg()

bool clang::analyze_format_string::FormatSpecifier::usesPositionalArg ( ) const
inline

Definition at line 438 of file FormatString.h.

References clang::Target.

Referenced by ParseScanfSpecifier().

Member Data Documentation

◆ argIndex

unsigned clang::analyze_format_string::FormatSpecifier::argIndex
protected

Definition at line 394 of file FormatString.h.

◆ CS

ConversionSpecifier clang::analyze_format_string::FormatSpecifier::CS
protected

Definition at line 387 of file FormatString.h.

◆ FieldWidth

OptionalAmount clang::analyze_format_string::FormatSpecifier::FieldWidth
protected

Definition at line 386 of file FormatString.h.

◆ LM

LengthModifier clang::analyze_format_string::FormatSpecifier::LM
protected

Definition at line 385 of file FormatString.h.

◆ UsesPositionalArg

bool clang::analyze_format_string::FormatSpecifier::UsesPositionalArg
protected

Positional arguments, an IEEE extension: IEEE Std 1003.1, 2004 Edition http://www.opengroup.org/onlinepubs/009695399/functions/printf.html.

Definition at line 393 of file FormatString.h.

◆ VectorNumElts

OptionalAmount clang::analyze_format_string::FormatSpecifier::VectorNumElts
protected

Definition at line 388 of file FormatString.h.


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