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()) {
267 llvm_unreachable(
"Unsupported LenghtModifier Type");
276 switch (LM.getKind()) {
307 llvm_unreachable(
"Unsupported LenghtModifier Type");
318 switch (LM.getKind()) {
333 switch (LM.getKind()) {
352 switch (LM.getKind()) {
373 switch (LM.getKind()) {
426 if (!ETy->getDecl()->isComplete())
428 PT = ETy->getDecl()->getIntegerType();
447 CAT->getSize().getZExtValue() - 1,
457 case BuiltinType::UInt:
458 case BuiltinType::Int:
459 case BuiltinType::Float:
464 case BuiltinType::Char_U:
465 case BuiltinType::UChar:
466 case BuiltinType::Char_S:
467 case BuiltinType::SChar:
472 case BuiltinType::Short:
473 case BuiltinType::UShort:
478 case BuiltinType::Long:
479 case BuiltinType::ULong:
480 case BuiltinType::Double:
485 case BuiltinType::LongLong:
486 case BuiltinType::ULongLong:
491 case BuiltinType::LongDouble:
501 if (isa<TypedefType>(PT) && (LangOpt.C99 || LangOpt.CPlusPlus11))
502 namedTypeToLengthModifier(PT, LM);
519 llvm_unreachable(
"Unexpected type");
527 if (usesPositionalArg())
528 os << getPositionalArgIndex() <<
"$";
529 if (SuppressAssignment)
532 FieldWidth.toString(os);
543 unsigned argIndex = 0;
563 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 ...
static std::string toString(const clang::SanitizerSet &Sanitizers)
Produce a string containing comma-separated names of sanitizers in Sanitizers set.
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
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>.