clang 22.0.0git
clang::analyze_printf::OptionalAmount Class Reference

#include "clang/AST/FormatString.h"

Public Types

enum  HowSpecified { NotSpecified , Constant , Arg , Invalid }

Public Member Functions

 OptionalAmount (HowSpecified howSpecified, unsigned amount, const char *amountStart, unsigned amountLength, bool usesPositionalArg)
 OptionalAmount (bool valid=true)
 OptionalAmount (unsigned Amount)
bool isInvalid () const
HowSpecified getHowSpecified () const
void setHowSpecified (HowSpecified h)
bool hasDataArgument () const
unsigned getArgIndex () const
unsigned getConstantAmount () const
const char * getStart () const
unsigned getConstantLength () const
ArgType getArgType (ASTContext &Ctx) const
void toString (raw_ostream &os) const
bool usesPositionalArg () const
unsigned getPositionalArgIndex () const
bool usesDotPrefix () const
void setUsesDotPrefix ()

Detailed Description

Definition at line 350 of file FormatString.h.

Member Enumeration Documentation

◆ HowSpecified

Enumerator
NotSpecified 
Constant 
Arg 
Invalid 

Definition at line 352 of file FormatString.h.

Constructor & Destructor Documentation

◆ OptionalAmount() [1/3]

clang::analyze_format_string::OptionalAmount::OptionalAmount ( HowSpecified howSpecified,
unsigned amount,
const char * amountStart,
unsigned amountLength,
bool usesPositionalArg )
inline

Definition at line 354 of file FormatString.h.

◆ OptionalAmount() [2/3]

clang::analyze_format_string::OptionalAmount::OptionalAmount ( bool valid = true)
inline

Definition at line 362 of file FormatString.h.

◆ OptionalAmount() [3/3]

clang::analyze_format_string::OptionalAmount::OptionalAmount ( unsigned Amount)
inlineexplicit

Definition at line 366 of file FormatString.h.

Member Function Documentation

◆ getArgIndex()

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

Definition at line 379 of file FormatString.h.

◆ getArgType()

ArgType analyze_format_string::OptionalAmount::getArgType ( ASTContext & Ctx) const

Definition at line 838 of file FormatString.cpp.

◆ getConstantAmount()

unsigned clang::analyze_format_string::OptionalAmount::getConstantAmount ( ) const
inline

Definition at line 384 of file FormatString.h.

Referenced by libc_func_matchers::hasUnsafeFormatOrSArg().

◆ getConstantLength()

unsigned clang::analyze_format_string::OptionalAmount::getConstantLength ( ) const
inline

Definition at line 394 of file FormatString.h.

◆ getHowSpecified()

HowSpecified clang::analyze_format_string::OptionalAmount::getHowSpecified ( ) const
inline

Definition at line 374 of file FormatString.h.

Referenced by libc_func_matchers::hasUnsafeFormatOrSArg().

◆ getPositionalArgIndex()

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

Definition at line 404 of file FormatString.h.

Referenced by libc_func_matchers::hasUnsafeFormatOrSArg().

◆ getStart()

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

Definition at line 389 of file FormatString.h.

◆ hasDataArgument()

bool clang::analyze_format_string::OptionalAmount::hasDataArgument ( ) const
inline

Definition at line 377 of file FormatString.h.

Referenced by libc_func_matchers::hasUnsafeFormatOrSArg().

◆ isInvalid()

bool clang::analyze_format_string::OptionalAmount::isInvalid ( ) const
inline

Definition at line 370 of file FormatString.h.

◆ setHowSpecified()

void clang::analyze_format_string::OptionalAmount::setHowSpecified ( HowSpecified h)
inline

Definition at line 375 of file FormatString.h.

◆ setUsesDotPrefix()

void clang::analyze_format_string::OptionalAmount::setUsesDotPrefix ( )
inline

Definition at line 410 of file FormatString.h.

◆ toString()

void OptionalAmount::toString ( raw_ostream & os) const

Definition at line 981 of file FormatString.cpp.

◆ usesDotPrefix()

bool clang::analyze_format_string::OptionalAmount::usesDotPrefix ( ) const
inline

Definition at line 409 of file FormatString.h.

◆ usesPositionalArg()

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

Definition at line 403 of file FormatString.h.


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