class UserDefinedLiteral
Declaration
class UserDefinedLiteral : public CallExpr { /* full declaration omitted */ };
Description
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit.ext]). Represents a user-defined literal, e.g. "foo"_bar or 1.23_xyz. While this is semantically equivalent to a normal call, this AST node provides better information about the syntactic representation of the literal. Since literal operators are never found by ADL and can only be declared at namespace scope, a user-defined literal is never dependent.
Declared at: clang/include/clang/AST/ExprCXX.h:638
Inherits from: CallExpr
Member Variables
- private clang::SourceLocation UDSuffixLoc
- The location of a ud-suffix within the literal.
Inherited from CallExpr:
- public static NotADL = ADLCallKind::NotADL
- public static UsesADL = ADLCallKind::UsesADL
Inherited from Stmt:
Method Overview
- public static clang::UserDefinedLiteral * Create(const clang::ASTContext & Ctx, clang::Expr * Fn, ArrayRef<clang::Expr *> Args, clang::QualType Ty, clang::ExprValueKind VK, clang::SourceLocation LitEndLoc, clang::SourceLocation SuffixLoc, clang::FPOptionsOverride FPFeatures)
- public static clang::UserDefinedLiteral * CreateEmpty(const clang::ASTContext & Ctx, unsigned int NumArgs, bool HasFPOptions, clang::Stmt::EmptyShell Empty)
- private UserDefinedLiteral(clang::Expr * Fn, ArrayRef<clang::Expr *> Args, clang::QualType Ty, clang::ExprValueKind VK, clang::SourceLocation LitEndLoc, clang::SourceLocation SuffixLoc, clang::FPOptionsOverride FPFeatures)
- private UserDefinedLiteral(unsigned int NumArgs, bool HasFPFeatures, clang::Stmt::EmptyShell Empty)
- public static bool classof(const clang::Stmt * S)
- public clang::SourceLocation getBeginLoc() const
- public clang::Expr * getCookedLiteral()
- public const clang::Expr * getCookedLiteral() const
- public clang::SourceLocation getEndLoc() const
- public clang::UserDefinedLiteral::LiteralOperatorKind getLiteralOperatorKind() const
- public const clang::IdentifierInfo * getUDSuffix() const
- public clang::SourceLocation getUDSuffixLoc() const
Inherited from CallExpr:
- public Create
- public CreateEmpty
- public CreateTemporary
- public arg_begin
- public arg_begin
- public arg_end
- public arg_end
- public arguments
- public arguments
- public children
- public children
- public classof
- public computeDependence
- public getADLCallKind
- public getArg
- public getArg
- public getArgs
- public getArgs
- public getBeginLoc
- public getBuiltinCallee
- public getCallReturnType
- public getCallee
- public getCallee
- public getCalleeDecl
- public getCalleeDecl
- public getDirectCallee
- public getDirectCallee
- public getEndLoc
- public getFPFeatures
- public getFPFeaturesInEffect
- public getNumArgs
- public getNumCommas
- protected getNumPreArgs
- protected getPreArg
- protected getPreArg
- public getRParenLoc
- public getRawSubExprs
- public getStoredFPFeatures
- protected getTrailingFPFeatures
- protected getTrailingFPFeatures
- public getUnusedResultAttr
- public hasStoredFPFeatures
- public hasUnusedResultAttr
- public isBuiltinAssumeFalse
- public isCallToStdMove
- public isUnevaluatedBuiltinCall
- public markDependentForPostponedNameLookup
- public setADLCallKind
- public setArg
- public setCallee
- public setNumArgsUnsafe
- protected setPreArg
- public setRParenLoc
- public setStoredFPFeatures
- public shrinkNumArgs
- protected sizeOfTrailingObjects
- public usesADL
Inherited from Expr:
- public Classify
- public ClassifyLValue
- public ClassifyModifiable
- public EvaluateAsBooleanCondition
- public EvaluateAsConstantExpr
- public EvaluateAsFixedPoint
- public EvaluateAsFloat
- public EvaluateAsInitializer
- public EvaluateAsInt
- public EvaluateAsLValue
- public EvaluateAsRValue
- public EvaluateForOverflow
- public EvaluateKnownConstInt
- public EvaluateKnownConstIntCheckOverflow
- public EvaluateWithSubstitution
- public HasSideEffects
- public IgnoreCasts
- public IgnoreCasts
- public IgnoreConversionOperatorSingleStep
- public IgnoreConversionOperatorSingleStep
- public IgnoreImpCasts
- public IgnoreImpCasts
- public IgnoreImplicit
- public IgnoreImplicit
- public IgnoreImplicitAsWritten
- public IgnoreImplicitAsWritten
- public IgnoreParenBaseCasts
- public IgnoreParenBaseCasts
- public IgnoreParenCasts
- public IgnoreParenCasts
- public IgnoreParenImpCasts
- public IgnoreParenImpCasts
- public IgnoreParenLValueCasts
- public IgnoreParenLValueCasts
- public IgnoreParenNoopCasts
- public IgnoreParenNoopCasts
- public IgnoreParens
- public IgnoreParens
- public IgnoreUnlessSpelledInSource
- public IgnoreUnlessSpelledInSource
- public classof
- public containsErrors
- public containsUnexpandedParameterPack
- public findBoundMemberType
- public getAsBuiltinConstantDeclRef
- public getBestDynamicClassType
- public getBestDynamicClassTypeExpr
- public getDependence
- public getExprLoc
- public getFPFeaturesInEffect
- public getIntegerConstantExpr
- public getObjCProperty
- public getObjectKind
- public getReferencedDeclOfCallee
- public getReferencedDeclOfCallee
- public getSourceBitField
- public getSourceBitField
- public getType
- public getValueKind
- public getValueKindForType
- public hasAnyTypeDependentArguments
- public hasNonTrivialCall
- public hasPlaceholderType
- public hasPlaceholderType
- public isBoundMemberFunction
- public isCXX11ConstantExpr
- public isCXX98IntegralConstantExpr
- public isConstantInitializer
- public isDefaultArgument
- public isEvaluatable
- public isGLValue
- public isImplicitCXXThis
- public isInstantiationDependent
- public isIntegerConstantExpr
- public isKnownToHaveBooleanValue
- public isLValue
- public isModifiableLvalue
- public isNullPointerConstant
- public isOBJCGCCandidate
- public isObjCSelfExpr
- public isOrdinaryOrBitFieldObject
- public isPRValue
- public isPotentialConstantExpr
- public isPotentialConstantExprUnevaluated
- public isReadIfDiscardedInCPlusPlus11
- public isSameComparisonOperand
- public isTemporaryObject
- public isTypeDependent
- public isUnusedResultAWarning
- public isValueDependent
- public isXValue
- public refersToBitField
- public refersToGlobalRegisterVar
- public refersToMatrixElement
- public refersToVectorElement
- protected setDependence
- public setObjectKind
- public setType
- public setValueKind
- public skipRValueSubobjectAdjustments
- public skipRValueSubobjectAdjustments
- public tryEvaluateObjectSize
- public tryEvaluateStrLen
Inherited from ValueStmt:
Inherited from Stmt:
- public EnableStatistics
- public IgnoreContainers
- public IgnoreContainers
- public PrintStats
- public ProcessODRHash
- public Profile
- public addStmtClass
- public child_begin
- public child_begin
- public child_end
- public child_end
- public children
- public children
- public determineLikelihoodConflict
- public dump
- public dump
- public dumpColor
- public dumpPretty
- public getBeginLoc
- public getEndLoc
- public getID
- public getLikelihood
- public getLikelihood
- public getLikelihood
- public getLikelihoodAttr
- public getSourceRange
- public getStmtClass
- public getStmtClassName
- public printJson
- public printPretty
- public printPrettyControlled
- public stripLabelLikeStatements
- public stripLabelLikeStatements
- public viewAST
Methods
¶static clang::UserDefinedLiteral* Create(
const clang::ASTContext& Ctx,
clang::Expr* Fn,
ArrayRef<clang::Expr*> Args,
clang::QualType Ty,
clang::ExprValueKind VK,
clang::SourceLocation LitEndLoc,
clang::SourceLocation SuffixLoc,
clang::FPOptionsOverride FPFeatures)
static clang::UserDefinedLiteral* Create(
const clang::ASTContext& Ctx,
clang::Expr* Fn,
ArrayRef<clang::Expr*> Args,
clang::QualType Ty,
clang::ExprValueKind VK,
clang::SourceLocation LitEndLoc,
clang::SourceLocation SuffixLoc,
clang::FPOptionsOverride FPFeatures)
Declared at: clang/include/clang/AST/ExprCXX.h:655
Parameters
- const clang::ASTContext& Ctx
- clang::Expr* Fn
- ArrayRef<clang::Expr*> Args
- clang::QualType Ty
- clang::ExprValueKind VK
- clang::SourceLocation LitEndLoc
- clang::SourceLocation SuffixLoc
- clang::FPOptionsOverride FPFeatures
¶static clang::UserDefinedLiteral* CreateEmpty(
const clang::ASTContext& Ctx,
unsigned int NumArgs,
bool HasFPOptions,
clang::Stmt::EmptyShell Empty)
static clang::UserDefinedLiteral* CreateEmpty(
const clang::ASTContext& Ctx,
unsigned int NumArgs,
bool HasFPOptions,
clang::Stmt::EmptyShell Empty)
Declared at: clang/include/clang/AST/ExprCXX.h:661
Parameters
- const clang::ASTContext& Ctx
- unsigned int NumArgs
- bool HasFPOptions
- clang::Stmt::EmptyShell Empty
¶UserDefinedLiteral(
clang::Expr* Fn,
ArrayRef<clang::Expr*> Args,
clang::QualType Ty,
clang::ExprValueKind VK,
clang::SourceLocation LitEndLoc,
clang::SourceLocation SuffixLoc,
clang::FPOptionsOverride FPFeatures)
UserDefinedLiteral(
clang::Expr* Fn,
ArrayRef<clang::Expr*> Args,
clang::QualType Ty,
clang::ExprValueKind VK,
clang::SourceLocation LitEndLoc,
clang::SourceLocation SuffixLoc,
clang::FPOptionsOverride FPFeatures)
Declared at: clang/include/clang/AST/ExprCXX.h:648
Parameters
- clang::Expr* Fn
- ArrayRef<clang::Expr*> Args
- clang::QualType Ty
- clang::ExprValueKind VK
- clang::SourceLocation LitEndLoc
- clang::SourceLocation SuffixLoc
- clang::FPOptionsOverride FPFeatures
¶UserDefinedLiteral(unsigned int NumArgs,
bool HasFPFeatures,
clang::Stmt::EmptyShell Empty)
UserDefinedLiteral(unsigned int NumArgs,
bool HasFPFeatures,
clang::Stmt::EmptyShell Empty)
Declared at: clang/include/clang/AST/ExprCXX.h:652
Parameters
- unsigned int NumArgs
- bool HasFPFeatures
- clang::Stmt::EmptyShell Empty
¶static bool classof(const clang::Stmt* S)
static bool classof(const clang::Stmt* S)
Declared at: clang/include/clang/AST/ExprCXX.h:715
Parameters
- const clang::Stmt* S
¶clang::SourceLocation getBeginLoc() const
clang::SourceLocation getBeginLoc() const
Declared at: clang/include/clang/AST/ExprCXX.h:698
¶clang::Expr* getCookedLiteral()
clang::Expr* getCookedLiteral()
Description
If this is not a raw user-defined literal, get the underlying cooked literal (representing the literal with the suffix removed).
Declared at: clang/include/clang/AST/ExprCXX.h:693
¶const clang::Expr* getCookedLiteral() const
const clang::Expr* getCookedLiteral() const
Declared at: clang/include/clang/AST/ExprCXX.h:694
¶clang::SourceLocation getEndLoc() const
clang::SourceLocation getEndLoc() const
Declared at: clang/include/clang/AST/ExprCXX.h:704
¶clang::UserDefinedLiteral::LiteralOperatorKind
getLiteralOperatorKind() const
clang::UserDefinedLiteral::LiteralOperatorKind
getLiteralOperatorKind() const
Description
Returns the kind of literal operator invocation which this expression represents.
Declared at: clang/include/clang/AST/ExprCXX.h:688
¶const clang::IdentifierInfo* getUDSuffix() const
const clang::IdentifierInfo* getUDSuffix() const
Description
Returns the ud-suffix specified for this literal.
Declared at: clang/include/clang/AST/ExprCXX.h:713
¶clang::SourceLocation getUDSuffixLoc() const
clang::SourceLocation getUDSuffixLoc() const
Description
Returns the location of a ud-suffix in the expression. For a string literal, there may be multiple identical suffixes. This returns the first.
Declared at: clang/include/clang/AST/ExprCXX.h:710