;
33 const char*&Beg,
const char*
E) {
35 const char*start = I - 1;
36UpdateOnReturn <const char*> UpdateBeg(Beg, I);
53 if(I + 1 !=
E&& I[0] ==
'^'&& I[1] ==
']') {
84 const char*Start =
nullptr;
85UpdateOnReturn <const char*> UpdateBeg(Beg, I);
88 for( ; I !=
E; ++I) {
112 if(ParseArgPosition(H, FS, Start, I,
E))
123FS.setSuppressAssignment(I);
135FS.setFieldWidth(Amt);
145 if(ParseLengthModifier(FS, I,
E, LO,
true) && I ==
E) {
158 const char*conversionPosition = I++;
160 switch(*conversionPosition) {
189 if(
Target.getTriple().isOSDarwin())
193 if(
Target.getTriple().isOSDarwin())
197 if(
Target.getTriple().isOSDarwin())
206FS.setConversionSpecifier(CS);
208&& !FS.usesPositionalArg())
209FS.setArgIndex(argIndex++);
215 unsignedLen = I - Beg;
216 if(ParseUTF8InvalidSpecifier(Beg,
E, Len)) {
218FS.setConversionSpecifier(CS);
234 caseConversionSpecifier::dArg:
235 caseConversionSpecifier::DArg:
236 caseConversionSpecifier::iArg:
268llvm_unreachable(
"Unsupported LengthModifier Type");
271 caseConversionSpecifier::bArg:
272 caseConversionSpecifier::oArg:
273 caseConversionSpecifier::OArg:
274 caseConversionSpecifier::uArg:
275 caseConversionSpecifier::UArg:
276 caseConversionSpecifier::xArg:
277 caseConversionSpecifier::XArg:
310llvm_unreachable(
"Unsupported LengthModifier Type");
313 caseConversionSpecifier::aArg:
314 caseConversionSpecifier::AArg:
315 caseConversionSpecifier::eArg:
316 caseConversionSpecifier::EArg:
317 caseConversionSpecifier::fArg:
318 caseConversionSpecifier::FArg:
319 caseConversionSpecifier::gArg:
320 caseConversionSpecifier::GArg:
333 caseConversionSpecifier::cArg:
334 caseConversionSpecifier::sArg:
335 caseConversionSpecifier::ScanListArg:
352 caseConversionSpecifier::CArg:
353 caseConversionSpecifier::SArg:
371 caseConversionSpecifier::pArg:
375 caseConversionSpecifier::nArg:
419 if(
CS.
getKind() == ConversionSpecifier::nArg)
430 if(!ETy->getDecl()->isComplete())
432PT = ETy->getDecl()->getIntegerType();
441 CS.
setKind(ConversionSpecifier::sArg);
451CAT->getZExtSize() - 1,
"", 0,
false);
459 caseBuiltinType::UInt:
460 caseBuiltinType::Int:
461 caseBuiltinType::Float:
466 caseBuiltinType::Char_U:
467 caseBuiltinType::UChar:
468 caseBuiltinType::Char_S:
469 caseBuiltinType::SChar:
474 caseBuiltinType::Short:
475 caseBuiltinType::UShort:
480 caseBuiltinType::Long:
481 caseBuiltinType::ULong:
482 caseBuiltinType::Double:
487 caseBuiltinType::LongLong:
488 caseBuiltinType::ULongLong:
493 caseBuiltinType::LongDouble:
503 if(LangOpt.C99 || LangOpt.CPlusPlus11)
515 CS.
setKind(ConversionSpecifier::fArg);
517 CS.
setKind(ConversionSpecifier::dArg);
519 CS.
setKind(ConversionSpecifier::uArg);
521llvm_unreachable(
"Unexpected type");
531 if(SuppressAssignment)
545 unsignedargIndex = 0;
565assert(I ==
E&&
"Format string not exhausted");
llvm::MachO::Target Target
static bool ParseScanList(FormatStringHandler &H, ScanfConversionSpecifier &CS, const char *&Beg, const char *E)
static ScanfSpecifierResult ParseScanfSpecifier(FormatStringHandler &H, const char *&Beg, const char *E, unsigned &argIndex, const LangOptions &LO, const TargetInfo &Target)
clang::analyze_format_string::SpecifierResult< ScanfSpecifier > ScanfSpecifierResult
__device__ __2f16 float c
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
const ConstantArrayType * getAsConstantArrayType(QualType T) const
QualType getUnsignedPointerDiffType() const
Return the unique unsigned counterpart of "ptrdiff_t" integer type.
CanQualType getIntMaxType() const
Return the unique type for "intmax_t" (C99 7.18.1.5), defined in <stdint.h>.
QualType getPointerDiffType() const
Return the unique type for "ptrdiff_t" (C99 7.17) defined in <stddef.h>.
CanQualType UnsignedLongTy
CanQualType getSizeType() const
Return the unique type for "size_t" (C99 7.17), defined in <stddef.h>.
CanQualType UnsignedCharTy
CanQualType UnsignedIntTy
CanQualType UnsignedLongLongTy
CanQualType UnsignedShortTy
const TargetInfo & getTargetInfo() const
QualType getWideCharType() const
Return the type of wide characters.
CanQualType getSignedSizeType() const
Return the unique signed counterpart of the integer type corresponding to size_t.
CanQualType getUIntMaxType() const
Return the unique type for "uintmax_t" (C99 7.18.1.5), defined in <stdint.h>.
This class is used for builtin types like 'int'.
Represents the canonical version of C arrays with a specified constant size.
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of enums.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
A (possibly-)qualified type.
Exposes information about the current target.
const llvm::Triple & getTriple() const
Returns the target triple of the primary target.
bool isSignedIntegerType() const
Return true if this is an integer type that is signed, according to C99 6.2.5p4 [char,...
bool isPointerType() const
QualType getPointeeType() const
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee.
bool isAnyCharacterType() const
Determine whether this type is any of the built-in character types.
bool isRealFloatingType() const
Floating point categories.
bool isWideCharType() const
bool isUnsignedIntegerType() const
Return true if this is an integer type that is unsigned, according to C99 6.2.5p6 [which returns true...
const T * getAs() const
Member-template getAs<specific type>'.
static ArgType PtrTo(const ArgType &A)
Create an ArgType which corresponds to the type pointer to A.
MatchKind matchesType(ASTContext &C, QualType argTy) const
void setEndScanList(const char *pos)
const char * toString() const
bool consumesDataArgument() const
unsigned getPositionalArgIndex() const
bool usesPositionalArg() const
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 L...
bool hasValidLengthModifier(const TargetInfo &Target, const LangOptions &LO) const
OptionalAmount FieldWidth
virtual void HandleIncompleteScanList(const char *start, const char *end)
virtual void HandleNullChar(const char *nullCharacter)
virtual void HandleIncompleteSpecifier(const char *startSpecifier, unsigned specifierLen)
virtual bool HandleScanfSpecifier(const analyze_scanf::ScanfSpecifier &FS, const char *startSpecifier, unsigned specifierLen)
virtual bool HandleInvalidScanfConversionSpecifier(const analyze_scanf::ScanfSpecifier &FS, const char *startSpecifier, unsigned specifierLen)
Represents the length modifier in a format string in scanf/printf.
const char * toString() const
void toString(raw_ostream &os) const
HowSpecified getHowSpecified() const
const T & getValue() const
const char * getStart() const
bool fixType(QualType QT, QualType RawQT, const LangOptions &LangOpt, ASTContext &Ctx)
void toString(raw_ostream &os) const
const ScanfConversionSpecifier & getConversionSpecifier() const
ArgType getArgType(ASTContext &Ctx) const
Defines the clang::TargetInfo interface.
Common components of both fprintf and fscanf format strings.
OptionalAmount ParseAmount(const char *&Beg, const char *E)
bool ParseScanfString(FormatStringHandler &H, const char *beg, const char *end, const LangOptions &LO, const TargetInfo &Target)
Pieces specific to fscanf format strings.
The JSON file list parser is used to communicate input to InstallAPI.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4