clang  6.0.0svn
Public Member Functions | Static Public Member Functions | List of all members
clang::analyze_scanf::ScanfSpecifier Class Reference

#include "clang/Analysis/Analyses/FormatString.h"

Inheritance diagram for clang::analyze_scanf::ScanfSpecifier:
Inheritance graph
[legend]
Collaboration diagram for clang::analyze_scanf::ScanfSpecifier:
Collaboration graph
[legend]

Public Member Functions

 ScanfSpecifier ()
 
void setSuppressAssignment (const char *position)
 
const OptionalFlaggetSuppressAssignment () const
 
void setConversionSpecifier (const ScanfConversionSpecifier &cs)
 
const ScanfConversionSpecifiergetConversionSpecifier () const
 
bool consumesDataArgument () const
 
ArgType getArgType (ASTContext &Ctx) const
 
bool fixType (QualType QT, QualType RawQT, const LangOptions &LangOpt, ASTContext &Ctx)
 
void toString (raw_ostream &os) const
 
- Public Member Functions inherited from clang::analyze_format_string::FormatSpecifier
 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 ScanfSpecifier Parse (const char *beg, const char *end)
 
- Static Public Member Functions inherited from clang::analyze_format_string::FormatSpecifier
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...
 

Additional Inherited Members

- Protected Attributes inherited from clang::analyze_format_string::FormatSpecifier
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 578 of file FormatString.h.

Constructor & Destructor Documentation

◆ ScanfSpecifier()

clang::analyze_scanf::ScanfSpecifier::ScanfSpecifier ( )
inline

Definition at line 581 of file FormatString.h.

Member Function Documentation

◆ consumesDataArgument()

bool clang::analyze_scanf::ScanfSpecifier::consumesDataArgument ( ) const
inline

◆ fixType()

bool ScanfSpecifier::fixType ( QualType  QT,
QualType  RawQT,
const LangOptions LangOpt,
ASTContext Ctx 
)

◆ getArgType()

ArgType ScanfSpecifier::getArgType ( ASTContext Ctx) const

Definition at line 226 of file ScanfFormatString.cpp.

References clang::analyze_format_string::ConversionSpecifier::aArg, clang::analyze_format_string::ConversionSpecifier::AArg, clang::analyze_format_string::ArgType::AnyCharTy, 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::consumesDataArgument(), clang::analyze_format_string::ArgType::CPointerTy, clang::analyze_format_string::ArgType::CStrTy, clang::analyze_format_string::ConversionSpecifier::dArg, clang::analyze_format_string::ConversionSpecifier::DArg, clang::ASTContext::DoubleTy, 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::ASTContext::FloatTy, clang::analyze_format_string::ConversionSpecifier::gArg, clang::analyze_format_string::ConversionSpecifier::GArg, clang::ASTContext::getIntMaxType(), clang::analyze_format_string::ConversionSpecifier::getKind(), clang::ASTContext::getPointerDiffType(), clang::ASTContext::getSignedSizeType(), clang::ASTContext::getSizeType(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ASTContext::getUIntMaxType(), clang::ASTContext::getUnsignedPointerDiffType(), clang::ASTContext::getWideCharType(), clang::analyze_format_string::ConversionSpecifier::iArg, clang::ASTContext::IntTy, clang::analyze_format_string::ArgType::Invalid(), clang::ASTContext::LongDoubleTy, clang::ASTContext::LongLongTy, clang::ASTContext::LongTy, 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::pArg, clang::analyze_format_string::ArgType::PtrTo(), clang::analyze_format_string::ConversionSpecifier::sArg, clang::analyze_format_string::ConversionSpecifier::SArg, clang::analyze_format_string::ConversionSpecifier::ScanListArg, clang::ASTContext::ShortTy, clang::ASTContext::SignedCharTy, clang::analyze_format_string::ConversionSpecifier::uArg, clang::analyze_format_string::ConversionSpecifier::UArg, clang::ASTContext::UnsignedCharTy, clang::ASTContext::UnsignedIntTy, clang::ASTContext::UnsignedLongLongTy, clang::ASTContext::UnsignedLongTy, clang::ASTContext::UnsignedShortTy, clang::analyze_format_string::ArgType::WCStrTy, clang::analyze_format_string::ConversionSpecifier::xArg, and clang::analyze_format_string::ConversionSpecifier::XArg.

◆ getConversionSpecifier()

const ScanfConversionSpecifier& clang::analyze_scanf::ScanfSpecifier::getConversionSpecifier ( ) const
inline

Definition at line 597 of file FormatString.h.

◆ getSuppressAssignment()

const OptionalFlag& clang::analyze_scanf::ScanfSpecifier::getSuppressAssignment ( ) const
inline

Definition at line 589 of file FormatString.h.

◆ Parse()

static ScanfSpecifier clang::analyze_scanf::ScanfSpecifier::Parse ( const char *  beg,
const char *  end 
)
static

◆ setConversionSpecifier()

void clang::analyze_scanf::ScanfSpecifier::setConversionSpecifier ( const ScanfConversionSpecifier cs)
inline

Definition at line 593 of file FormatString.h.

◆ setSuppressAssignment()

void clang::analyze_scanf::ScanfSpecifier::setSuppressAssignment ( const char *  position)
inline

◆ toString()

void ScanfSpecifier::toString ( raw_ostream &  os) const

Definition at line 522 of file ScanfFormatString.cpp.


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