clang 20.0.0git
|
#include "clang/AST/FormatString.h"
Public Types | |
enum | Kind { InvalidSpecifier = 0 , cArg , dArg , DArg , iArg , bArg , BArg , IntArgBeg = dArg , IntArgEnd = BArg , oArg , OArg , uArg , UArg , xArg , XArg , UIntArgBeg = oArg , UIntArgEnd = XArg , fArg , FArg , eArg , EArg , gArg , GArg , aArg , AArg , DoubleArgBeg = fArg , DoubleArgEnd = AArg , sArg , pArg , nArg , PercentArg , CArg , SArg , PArg , ZArg , kArg , KArg , rArg , RArg , FixedPointArgBeg = kArg , FixedPointArgEnd = RArg , ObjCObjArg , ObjCBeg = ObjCObjArg , ObjCEnd = ObjCObjArg , FreeBSDbArg , FreeBSDDArg , FreeBSDrArg , FreeBSDyArg , PrintErrno , PrintfConvBeg = ObjCObjArg , PrintfConvEnd = PrintErrno , ScanListArg , ScanfConvBeg = ScanListArg , ScanfConvEnd = ScanListArg } |
Public Member Functions | |
ConversionSpecifier (bool isPrintf=true) | |
ConversionSpecifier (bool isPrintf, const char *pos, Kind k) | |
const char * | getStart () const |
StringRef | getCharacters () const |
bool | consumesDataArgument () const |
Kind | getKind () const |
void | setKind (Kind k) |
unsigned | getLength () const |
void | setEndScanList (const char *pos) |
bool | isIntArg () const |
bool | isUIntArg () const |
bool | isAnyIntArg () const |
bool | isDoubleArg () const |
bool | isFixedPointArg () const |
const char * | toString () const |
bool | isPrintfKind () const |
std::optional< ConversionSpecifier > | getStandardSpecifier () const |
Protected Attributes | |
bool | IsPrintf |
const char * | Position |
const char * | EndScanList |
Kind | kind |
Definition at line 122 of file FormatString.h.
Definition at line 124 of file FormatString.h.
|
inline |
Definition at line 205 of file FormatString.h.
|
inline |
Definition at line 209 of file FormatString.h.
|
inline |
Definition at line 220 of file FormatString.h.
References InvalidSpecifier, IsPrintf, kind, PercentArg, and PrintErrno.
Referenced by clang::analyze_printf::PrintfSpecifier::consumesDataArgument(), clang::analyze_scanf::ScanfSpecifier::consumesDataArgument(), clang::analyze_scanf::ScanfSpecifier::getArgType(), clang::analyze_printf::PrintfSpecifier::getArgType(), ParsePrintfSpecifier(), and ParseScanfSpecifier().
|
inline |
Definition at line 216 of file FormatString.h.
References getLength(), and getStart().
|
inline |
Definition at line 234 of file FormatString.h.
References kind.
Referenced by clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::getArgType(), clang::analyze_format_string::FormatSpecifier::getCorrectedLengthModifier(), getStandardSpecifier(), clang::analyze_format_string::FormatSpecifier::hasStandardConversionSpecifier(), clang::analyze_format_string::FormatSpecifier::hasStandardLengthConversionCombination(), clang::analyze_printf::PrintfSpecifier::hasValidAlternativeForm(), clang::analyze_printf::PrintfSpecifier::hasValidFieldWidth(), clang::analyze_printf::PrintfSpecifier::hasValidLeadingZeros(), clang::analyze_printf::PrintfSpecifier::hasValidLeftJustified(), clang::analyze_format_string::FormatSpecifier::hasValidLengthModifier(), clang::analyze_printf::PrintfSpecifier::hasValidPlusPrefix(), clang::analyze_printf::PrintfSpecifier::hasValidPrecision(), clang::analyze_printf::PrintfSpecifier::hasValidSpacePrefix(), and clang::analyze_printf::PrintfSpecifier::hasValidThousandsGroupingPrefix().
|
inline |
Definition at line 236 of file FormatString.h.
References EndScanList, and Position.
Referenced by getCharacters().
std::optional< ConversionSpecifier > ConversionSpecifier::getStandardSpecifier | ( | ) | const |
|
inline |
|
inline |
Definition at line 244 of file FormatString.h.
References IntArgBeg, kind, and UIntArgEnd.
Referenced by clang::analyze_format_string::FormatSpecifier::getCorrectedLengthModifier().
|
inline |
Definition at line 245 of file FormatString.h.
References DoubleArgBeg, DoubleArgEnd, and kind.
Referenced by clang::analyze_format_string::FormatSpecifier::hasValidLengthModifier().
|
inline |
Definition at line 248 of file FormatString.h.
References FixedPointArgBeg, FixedPointArgEnd, and kind.
Referenced by clang::analyze_format_string::FormatSpecifier::hasValidLengthModifier().
|
inline |
Definition at line 241 of file FormatString.h.
References FreeBSDrArg, FreeBSDyArg, IntArgBeg, IntArgEnd, and kind.
|
inline |
Definition at line 254 of file FormatString.h.
References IsPrintf.
Referenced by clang::analyze_printf::PrintfConversionSpecifier::classof(), and clang::analyze_scanf::ScanfConversionSpecifier::classof().
|
inline |
Definition at line 243 of file FormatString.h.
References kind, UIntArgBeg, and UIntArgEnd.
|
inline |
Definition at line 239 of file FormatString.h.
References EndScanList.
Referenced by ParsePrintfSpecifier(), ParseScanfSpecifier(), and ParseScanList().
|
inline |
Definition at line 235 of file FormatString.h.
References kind.
Referenced by clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), and getStandardSpecifier().
const char * ConversionSpecifier::toString | ( | ) | const |
Definition at line 728 of file FormatString.cpp.
References aArg, AArg, bArg, BArg, cArg, CArg, dArg, DArg, eArg, EArg, fArg, FArg, FreeBSDbArg, FreeBSDDArg, FreeBSDrArg, FreeBSDyArg, gArg, GArg, iArg, InvalidSpecifier, kArg, KArg, kind, nArg, oArg, OArg, ObjCObjArg, pArg, PArg, PercentArg, PrintErrno, rArg, RArg, sArg, SArg, ScanListArg, uArg, UArg, xArg, XArg, and ZArg.
Referenced by clang::analyze_printf::PrintfSpecifier::toString(), and clang::analyze_scanf::ScanfSpecifier::toString().
|
protected |
Definition at line 261 of file FormatString.h.
Referenced by getLength(), and setEndScanList().
|
protected |
Definition at line 259 of file FormatString.h.
Referenced by consumesDataArgument(), and isPrintfKind().
|
protected |
Definition at line 262 of file FormatString.h.
Referenced by consumesDataArgument(), getKind(), isAnyIntArg(), isDoubleArg(), clang::analyze_printf::PrintfConversionSpecifier::isDoubleArg(), isFixedPointArg(), isIntArg(), clang::analyze_printf::PrintfConversionSpecifier::isObjCArg(), isUIntArg(), setKind(), and toString().
|
protected |
Definition at line 260 of file FormatString.h.
Referenced by getLength(), and getStart().