clang 23.0.0git
clang::analyze_format_string::LengthModifier Class Reference

Represents the length modifier in a format string in scanf/printf. More...

#include "clang/AST/FormatString.h"

Public Types

enum  Kind {
  None , AsChar , AsShort , AsShortLong ,
  AsLong , AsLongLong , AsQuad , AsIntMax ,
  AsSizeT , AsPtrDiff , AsInt32 , AsInt3264 ,
  AsInt64 , AsLongDouble , AsIntN , AsFastIntN ,
  AsDecimal32 , AsDecimal64 , AsDecimal128 , AsAllocate ,
  AsMAllocate , AsWide , AsWideChar = AsLong
}

Public Member Functions

 LengthModifier ()
 LengthModifier (const char *pos, Kind k)
 LengthModifier (const char *pos, Kind k, unsigned bitWidth, unsigned length)
const char * getStart () const
unsigned getLength () const
Kind getKind () const
void setKind (Kind k)
unsigned getBitWidth () const
StringRef toString () const

Detailed Description

Represents the length modifier in a format string in scanf/printf.

Definition at line 67 of file FormatString.h.

Member Enumeration Documentation

◆ Kind

Enumerator
None 
AsChar 
AsShort 
AsShortLong 
AsLong 
AsLongLong 
AsQuad 
AsIntMax 
AsSizeT 
AsPtrDiff 
AsInt32 
AsInt3264 
AsInt64 
AsLongDouble 
AsIntN 
AsFastIntN 
AsDecimal32 
AsDecimal64 
AsDecimal128 
AsAllocate 
AsMAllocate 
AsWide 
AsWideChar 

Definition at line 69 of file FormatString.h.

Constructor & Destructor Documentation

◆ LengthModifier() [1/3]

clang::analyze_format_string::LengthModifier::LengthModifier ( )
inline

Definition at line 95 of file FormatString.h.

References None, and clang::nullptr.

◆ LengthModifier() [2/3]

clang::analyze_format_string::LengthModifier::LengthModifier ( const char * pos,
Kind k )
inline

Definition at line 96 of file FormatString.h.

◆ LengthModifier() [3/3]

clang::analyze_format_string::LengthModifier::LengthModifier ( const char * pos,
Kind k,
unsigned bitWidth,
unsigned length )
inline

Definition at line 97 of file FormatString.h.

References length().

Member Function Documentation

◆ getBitWidth()

unsigned clang::analyze_format_string::LengthModifier::getBitWidth ( ) const
inline

Definition at line 126 of file FormatString.h.

Referenced by clang::analyze_format_string::ArgType::makeIntNType().

◆ getKind()

Kind clang::analyze_format_string::LengthModifier::getKind ( ) const
inline

Definition at line 123 of file FormatString.h.

Referenced by clang::analyze_format_string::ArgType::makeIntNType().

◆ getLength()

unsigned clang::analyze_format_string::LengthModifier::getLength ( ) const
inline

Definition at line 102 of file FormatString.h.

References AsChar, AsDecimal128, AsFastIntN, AsInt32, AsInt64, AsIntN, AsLongLong, and None.

Referenced by toString().

◆ getStart()

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

Definition at line 100 of file FormatString.h.

◆ setKind()

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

◆ toString()

StringRef analyze_format_string::LengthModifier::toString ( ) const

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