|
clang 23.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 137 of file FormatString.h.
Definition at line 139 of file FormatString.h.
|
inline |
Definition at line 220 of file FormatString.h.
References EndScanList, InvalidSpecifier, IsPrintf, kind, clang::nullptr, and Position.
Referenced by getStandardSpecifier(), clang::analyze_printf::PrintfConversionSpecifier::PrintfConversionSpecifier(), clang::analyze_printf::PrintfConversionSpecifier::PrintfConversionSpecifier(), clang::analyze_scanf::ScanfConversionSpecifier::ScanfConversionSpecifier(), and clang::analyze_scanf::ScanfConversionSpecifier::ScanfConversionSpecifier().
|
inline |
Definition at line 224 of file FormatString.h.
References EndScanList, IsPrintf, kind, clang::nullptr, and Position.
|
inline |
Definition at line 231 of file FormatString.h.
References InvalidSpecifier, IsPrintf, kind, PercentArg, and PrintErrno.
Referenced by clang::analyze_printf::PrintfSpecifier::consumesDataArgument(), ParsePrintfSpecifier(), and ParseScanfSpecifier().
|
inline |
Definition at line 229 of file FormatString.h.
References getLength(), and getStart().
|
inline |
Definition at line 245 of file FormatString.h.
References kind.
Referenced by getStandardSpecifier(), libc_func_matchers::hasUnsafeFormatOrSArg(), and clang::analyze_format_string::ParseFormatStringHasSArg().
|
inline |
Definition at line 247 of file FormatString.h.
References EndScanList, and Position.
Referenced by getCharacters().
| std::optional< ConversionSpecifier > ConversionSpecifier::getStandardSpecifier | ( | ) | const |
|
inline |
|
inline |
Definition at line 257 of file FormatString.h.
References IntArgBeg, kind, and UIntArgEnd.
|
inline |
Definition at line 258 of file FormatString.h.
References DoubleArgBeg, DoubleArgEnd, and kind.
|
inline |
Definition at line 261 of file FormatString.h.
References FixedPointArgBeg, FixedPointArgEnd, and kind.
|
inline |
Definition at line 252 of file FormatString.h.
References FreeBSDrArg, FreeBSDyArg, IntArgBeg, IntArgEnd, and kind.
|
inline |
Definition at line 267 of file FormatString.h.
References IsPrintf.
Referenced by clang::analyze_printf::PrintfConversionSpecifier::classof(), and clang::analyze_scanf::ScanfConversionSpecifier::classof().
|
inline |
Definition at line 256 of file FormatString.h.
References kind, UIntArgBeg, and UIntArgEnd.
|
inline |
Definition at line 250 of file FormatString.h.
References EndScanList.
Referenced by ParsePrintfSpecifier(), ParseScanfSpecifier(), and ParseScanList().
|
inline |
Definition at line 246 of file FormatString.h.
References kind.
Referenced by getStandardSpecifier().
| const char * ConversionSpecifier::toString | ( | ) | const |
Definition at line 1012 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.
|
protected |
Definition at line 274 of file FormatString.h.
Referenced by ConversionSpecifier(), ConversionSpecifier(), getLength(), and setEndScanList().
|
protected |
Definition at line 272 of file FormatString.h.
Referenced by consumesDataArgument(), ConversionSpecifier(), ConversionSpecifier(), and isPrintfKind().
|
protected |
Definition at line 275 of file FormatString.h.
Referenced by consumesDataArgument(), ConversionSpecifier(), ConversionSpecifier(), getKind(), isAnyIntArg(), isDoubleArg(), clang::analyze_printf::PrintfConversionSpecifier::isDoubleArg(), isFixedPointArg(), isIntArg(), clang::analyze_printf::PrintfConversionSpecifier::isObjCArg(), isUIntArg(), setKind(), and toString().
|
protected |
Definition at line 273 of file FormatString.h.
Referenced by ConversionSpecifier(), ConversionSpecifier(), getLength(), and getStart().