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

#include "clang/Analysis/Analyses/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 setFieldWidth (const OptionalAmount &Amt)
 
bool usesPositionalArg () const
 
bool hasValidLengthModifier (const TargetInfo &Target) 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
 
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 354 of file FormatString.h.

Constructor & Destructor Documentation

◆ FormatSpecifier()

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

Definition at line 365 of file FormatString.h.

Member Function Documentation

◆ getArgIndex()

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

Definition at line 378 of file FormatString.h.

◆ getCorrectedLengthModifier()

Optional< LengthModifier > FormatSpecifier::getCorrectedLengthModifier ( ) const

◆ getFieldWidth()

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

Definition at line 390 of file FormatString.h.

◆ getLengthModifier()

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

Definition at line 386 of file FormatString.h.

◆ getPositionalArgIndex()

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

Definition at line 382 of file FormatString.h.

◆ hasStandardConversionSpecifier()

bool FormatSpecifier::hasStandardConversionSpecifier ( const LangOptions LangOpt) const

Definition at line 847 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

Definition at line 671 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::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 374 of file FormatString.h.

◆ setFieldWidth()

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

Definition at line 394 of file FormatString.h.

◆ setLengthModifier()

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

Definition at line 368 of file FormatString.h.

◆ setUsesPositionalArg()

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

Definition at line 372 of file FormatString.h.

◆ usesPositionalArg()

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

Definition at line 398 of file FormatString.h.

Member Data Documentation

◆ argIndex

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

Definition at line 363 of file FormatString.h.

◆ CS

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

Definition at line 358 of file FormatString.h.

◆ FieldWidth

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

Definition at line 357 of file FormatString.h.

◆ LM

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

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


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