33 const char *&Beg,
const char *
E) {
35 const char *start = I - 1;
36 UpdateOnReturn <const char*> UpdateBeg(Beg, I);
53 if (I + 1 !=
E && I[0] ==
'^' && I[1] ==
']') {
84 const char *Start =
nullptr;
85 UpdateOnReturn <const char*> UpdateBeg(Beg, I);
88 for ( ; I !=
E ; ++I) {
112 if (ParseArgPosition(H, FS, Start, I,
E))
123 FS.setSuppressAssignment(I);
135 FS.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())
206 FS.setConversionSpecifier(CS);
208 && !FS.usesPositionalArg())
209 FS.setArgIndex(argIndex++);
215 unsigned Len = I - Beg;
216 if (ParseUTF8InvalidSpecifier(Beg,
E, Len)) {
218 FS.setConversionSpecifier(CS);
234 case ConversionSpecifier::dArg:
235 case ConversionSpecifier::DArg:
236 case ConversionSpecifier::iArg:
270 llvm_unreachable(
"Unsupported LengthModifier Type");
273 case ConversionSpecifier::bArg:
274 case ConversionSpecifier::oArg:
275 case ConversionSpecifier::OArg:
276 case ConversionSpecifier::uArg:
277 case ConversionSpecifier::UArg:
278 case ConversionSpecifier::xArg:
279 case ConversionSpecifier::XArg:
313 llvm_unreachable(
"Unsupported LengthModifier Type");
316 case ConversionSpecifier::aArg:
317 case ConversionSpecifier::AArg:
318 case ConversionSpecifier::eArg:
319 case ConversionSpecifier::EArg:
320 case ConversionSpecifier::fArg:
321 case ConversionSpecifier::FArg:
322 case ConversionSpecifier::gArg:
323 case ConversionSpecifier::GArg:
336 case ConversionSpecifier::cArg:
337 case ConversionSpecifier::sArg:
338 case ConversionSpecifier::ScanListArg:
355 case ConversionSpecifier::CArg:
356 case ConversionSpecifier::SArg:
374 case ConversionSpecifier::pArg:
378 case ConversionSpecifier::nArg:
424 if (
CS.
getKind() == ConversionSpecifier::nArg)
435 if (!ED->isComplete())
437 PT = ED->getIntegerType();
456 CAT->getZExtSize() - 1,
"", 0,
false);
464 case BuiltinType::UInt:
465 case BuiltinType::Int:
466 case BuiltinType::Float:
471 case BuiltinType::Char_U:
472 case BuiltinType::UChar:
473 case BuiltinType::Char_S:
474 case BuiltinType::SChar:
479 case BuiltinType::Short:
480 case BuiltinType::UShort:
485 case BuiltinType::Long:
486 case BuiltinType::ULong:
487 case BuiltinType::Double:
492 case BuiltinType::LongLong:
493 case BuiltinType::ULongLong:
498 case BuiltinType::LongDouble:
508 if (LangOpt.C99 || LangOpt.CPlusPlus11)
526 llvm_unreachable(
"Unexpected type");
536 if (SuppressAssignment)
550 unsigned argIndex = 0;
570 assert(I ==
E &&
"Format string not exhausted");
llvm::MachO::Target Target
__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 UnsignedCharTy
CanQualType UnsignedIntTy
CanQualType UnsignedLongLongTy
CanQualType UnsignedShortTy
QualType getSizeType() const
Return the unique type for "size_t" (C99 7.17), defined in <stddef.h>.
const TargetInfo & getTargetInfo() const
QualType getSignedSizeType() const
Return the unique signed counterpart of the integer type corresponding to size_t.
QualType getWideCharType() const
Return the type of wide characters.
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.
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.
EnumDecl * getAsEnumDecl() const
Retrieves the EnumDecl this type refers to.
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>'.
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.
Pieces specific to fscanf format strings.
The JSON file list parser is used to communicate input to InstallAPI.