27 using namespace clang;
34 const char *&Beg,
const char *E) {
36 const char *start = I - 1;
54 if (I + 1 != E && I[0] ==
'^' && I[1] ==
']') {
85 const char *Start =
nullptr;
89 for ( ; I != E ; ++I) {
159 const char *conversionPosition = I++;
161 switch (*conversionPosition) {
202 if (k == ScanfConversionSpecifier::ScanListArg) {
214 if (k == ScanfConversionSpecifier::InvalidSpecifier) {
215 unsigned Len = I - Beg;
237 switch (LM.getKind()) {
275 switch (LM.getKind()) {
316 switch (LM.getKind()) {
331 switch (LM.getKind()) {
350 switch (LM.getKind()) {
371 switch (LM.getKind()) {
424 if (!ETy->getDecl()->isComplete())
426 PT = ETy->getDecl()->getIntegerType();
445 CAT->getSize().getZExtValue() - 1,
455 case BuiltinType::UInt:
456 case BuiltinType::Int:
457 case BuiltinType::Float:
462 case BuiltinType::Char_U:
463 case BuiltinType::UChar:
464 case BuiltinType::Char_S:
465 case BuiltinType::SChar:
470 case BuiltinType::Short:
471 case BuiltinType::UShort:
476 case BuiltinType::Long:
477 case BuiltinType::ULong:
478 case BuiltinType::Double:
483 case BuiltinType::LongLong:
484 case BuiltinType::ULongLong:
489 case BuiltinType::LongDouble:
499 if (isa<TypedefType>(PT) && (LangOpt.C99 || LangOpt.CPlusPlus11))
500 namedTypeToLengthModifier(PT, LM);
517 llvm_unreachable(
"Unexpected type");
525 if (usesPositionalArg())
526 os << getPositionalArgIndex() <<
"$";
527 if (SuppressAssignment)
530 FieldWidth.toString(os);
541 unsigned argIndex = 0;
561 assert(I == E &&
"Format string not exhausted");
A (possibly-)qualified type.
QualType getPointerDiffType() const
Return the unique type for "ptrdiff_t" (C99 7.17) defined in <stddef.h>.
const OptionalFlag & getSuppressAssignment() const
QualType getPointeeType() const
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee...
const llvm::Triple & getTriple() const
Returns the target triple of the primary target.
bool isRealFloatingType() const
Floating point categories.
const TargetInfo & getTargetInfo() 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>'.
bool isWideCharType() const
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
QualType getUnsignedPointerDiffType() const
Return the unique unsigned counterpart of "ptrdiff_t" integer type.
CanQualType UnsignedCharTy
Exposes information about the current target.
bool isSignedIntegerType() const
Return true if this is an integer type that is signed, according to C99 6.2.5p4 [char, signed char, short, int, long..], or an enum decl which has a signed representation.
CanQualType getUIntMaxType() const
Return the unique type for "uintmax_t" (C99 7.18.1.5), defined in <stdint.h>.
QualType getWideCharType() const
Return the type of wide characters.
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of enums...
const ConstantArrayType * getAsConstantArrayType(QualType T) const
CanQualType getSignedSizeType() const
Return the unique signed counterpart of the integer type corresponding to size_t. ...
void setConversionSpecifier(const ScanfConversionSpecifier &cs)
bool isAnyCharacterType() const
Determine whether this type is any of the built-in character types.
CanQualType UnsignedShortTy
Dataflow Directional Tag Classes.
void setSuppressAssignment(const char *position)
Pieces specific to fscanf format strings.
CanQualType UnsignedLongLongTy
std::string toString(const til::SExpr *E)
CanQualType UnsignedLongTy
This class is used for builtin types like 'int'.
Defines the clang::TargetInfo interface.
bool isPointerType() const
CanQualType getIntMaxType() const
Return the unique type for "intmax_t" (C99 7.18.1.5), defined in <stdint.h>.
Represents the canonical version of C arrays with a specified constant size.
CanQualType UnsignedIntTy
CanQualType getSizeType() const
Return the unique type for "size_t" (C99 7.17), defined in <stddef.h>.