27class AggExprEmitter :
public StmtVisitor<AggExprEmitter> {
38 void withReturnValueSlot(
const Expr *e,
39 llvm::function_ref<RValue(ReturnValueSlot)> fn);
41 AggValueSlot ensureSlot(mlir::Location loc, QualType t) {
42 if (!dest.isIgnored())
45 cgf.cgm.errorNYI(loc,
"Slot for ignored address");
49 void ensureDest(mlir::Location loc, QualType ty) {
50 if (!dest.isIgnored())
52 dest = cgf.createAggTemp(ty, loc,
"agg.tmp.ensured");
56 AggExprEmitter(CIRGenFunction &cgf, AggValueSlot dest)
57 : cgf(cgf), dest(dest) {}
62 void emitAggLoadOfLValue(
const Expr *e);
64 void emitArrayInit(Address destPtr, cir::ArrayType arrayTy, QualType arrayQTy,
65 Expr *exprToVisit, ArrayRef<Expr *> args,
69 void emitFinalDestCopy(QualType
type,
const LValue &src);
71 void emitCopy(QualType
type,
const AggValueSlot &dest,
72 const AggValueSlot &src);
74 void emitInitializationToLValue(Expr *e, LValue lv);
76 void emitNullInitializationToLValue(mlir::Location loc, LValue lv);
78 void Visit(Expr *e) { StmtVisitor<AggExprEmitter>::Visit(e); }
80 void VisitArraySubscriptExpr(ArraySubscriptExpr *e) {
81 emitAggLoadOfLValue(e);
84 void VisitCallExpr(
const CallExpr *e);
85 void VisitStmtExpr(
const StmtExpr *e) {
86 CIRGenFunction::StmtExprEvaluation eval(cgf);
89 (void)cgf.emitCompoundStmt(*e->
getSubStmt(), &retAlloca, dest);
92 void VisitDeclRefExpr(DeclRefExpr *e) { emitAggLoadOfLValue(e); }
94 void VisitInitListExpr(InitListExpr *e);
95 void VisitCXXConstructExpr(
const CXXConstructExpr *e);
97 void visitCXXParenListOrInitListExpr(Expr *e, ArrayRef<Expr *> args,
98 FieldDecl *initializedFieldInUnion,
100 void VisitCXXDefaultInitExpr(CXXDefaultInitExpr *die) {
101 CIRGenFunction::CXXDefaultInitExprScope Scope(cgf, die);
104 void VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *e) {
107 bool wasExternallyDestructed = dest.isExternallyDestructed();
111 dest.setExternallyDestructed();
116 if (!wasExternallyDestructed)
120 void VisitExprWithCleanups(ExprWithCleanups *e);
125 case CK_LValueToRValue:
130 "AggExprEmitter: volatile lvalue-to-rvalue cast");
133 case CK_UserDefinedConversion:
134 case CK_ConstructorConversion:
137 "Implicit cast types must be compatible");
142 std::string(
"AggExprEmitter: VisitCastExpr: ") +
147 void VisitStmt(Stmt *
s) {
148 cgf.cgm.errorNYI(
s->getSourceRange(),
149 std::string(
"AggExprEmitter::VisitStmt: ") +
150 s->getStmtClassName());
152 void VisitParenExpr(ParenExpr *pe) { Visit(pe->
getSubExpr()); }
153 void VisitGenericSelectionExpr(GenericSelectionExpr *ge) {
156 void VisitCoawaitExpr(CoawaitExpr *e) {
157 cgf.cgm.errorNYI(e->
getSourceRange(),
"AggExprEmitter: VisitCoawaitExpr");
159 void VisitCoyieldExpr(CoyieldExpr *e) {
160 cgf.cgm.errorNYI(e->
getSourceRange(),
"AggExprEmitter: VisitCoyieldExpr");
162 void VisitUnaryCoawait(UnaryOperator *e) {
163 cgf.cgm.errorNYI(e->
getSourceRange(),
"AggExprEmitter: VisitUnaryCoawait");
165 void VisitUnaryExtension(UnaryOperator *e) { Visit(e->
getSubExpr()); }
166 void VisitSubstNonTypeTemplateParmExpr(SubstNonTypeTemplateParmExpr *e) {
168 "AggExprEmitter: VisitSubstNonTypeTemplateParmExpr");
170 void VisitConstantExpr(ConstantExpr *e) {
171 cgf.cgm.errorNYI(e->
getSourceRange(),
"AggExprEmitter: VisitConstantExpr");
173 void VisitMemberExpr(MemberExpr *e) {
174 cgf.cgm.errorNYI(e->
getSourceRange(),
"AggExprEmitter: VisitMemberExpr");
176 void VisitUnaryDeref(UnaryOperator *e) {
177 cgf.cgm.errorNYI(e->
getSourceRange(),
"AggExprEmitter: VisitUnaryDeref");
179 void VisitStringLiteral(StringLiteral *e) {
180 cgf.cgm.errorNYI(e->
getSourceRange(),
"AggExprEmitter: VisitStringLiteral");
182 void VisitCompoundLiteralExpr(CompoundLiteralExpr *e) {
184 "AggExprEmitter: VisitCompoundLiteralExpr");
186 void VisitPredefinedExpr(
const PredefinedExpr *e) {
188 "AggExprEmitter: VisitPredefinedExpr");
190 void VisitBinaryOperator(
const BinaryOperator *e) {
192 "AggExprEmitter: VisitBinaryOperator");
194 void VisitPointerToDataMemberBinaryOperator(
const BinaryOperator *e) {
196 "AggExprEmitter: VisitPointerToDataMemberBinaryOperator");
198 void VisitBinAssign(
const BinaryOperator *e) {
199 cgf.cgm.errorNYI(e->
getSourceRange(),
"AggExprEmitter: VisitBinAssign");
201 void VisitBinComma(
const BinaryOperator *e) {
202 cgf.emitIgnoredExpr(e->
getLHS());
205 void VisitBinCmp(
const BinaryOperator *e) {
206 cgf.cgm.errorNYI(e->
getSourceRange(),
"AggExprEmitter: VisitBinCmp");
208 void VisitCXXRewrittenBinaryOperator(CXXRewrittenBinaryOperator *e) {
210 "AggExprEmitter: VisitCXXRewrittenBinaryOperator");
212 void VisitObjCMessageExpr(ObjCMessageExpr *e) {
214 "AggExprEmitter: VisitObjCMessageExpr");
216 void VisitObjCIVarRefExpr(ObjCIvarRefExpr *e) {
218 "AggExprEmitter: VisitObjCIVarRefExpr");
221 void VisitDesignatedInitUpdateExpr(DesignatedInitUpdateExpr *e) {
223 LValue destLV = cgf.makeAddrLValue(dest.getAddress(), e->
getType());
224 emitInitializationToLValue(e->
getBase(), destLV);
227 void VisitAbstractConditionalOperator(
const AbstractConditionalOperator *e) {
229 "AggExprEmitter: VisitAbstractConditionalOperator");
232 void VisitCXXParenListInitExpr(CXXParenListInitExpr *e) {
238 void VisitArrayInitLoopExpr(
const ArrayInitLoopExpr *e,
239 llvm::Value *outerBegin =
nullptr) {
241 "AggExprEmitter: VisitArrayInitLoopExpr");
243 void VisitImplicitValueInitExpr(ImplicitValueInitExpr *e) {
245 "AggExprEmitter: VisitImplicitValueInitExpr");
247 void VisitNoInitExpr(NoInitExpr *e) {
248 cgf.cgm.errorNYI(e->
getSourceRange(),
"AggExprEmitter: VisitNoInitExpr");
250 void VisitCXXDefaultArgExpr(CXXDefaultArgExpr *dae) {
252 "AggExprEmitter: VisitCXXDefaultArgExpr");
254 void VisitCXXInheritedCtorInitExpr(
const CXXInheritedCtorInitExpr *e) {
256 "AggExprEmitter: VisitCXXInheritedCtorInitExpr");
258 void VisitCXXStdInitializerListExpr(CXXStdInitializerListExpr *e) {
260 "AggExprEmitter: VisitCXXStdInitializerListExpr");
262 void VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *e) {
264 "AggExprEmitter: VisitCXXScalarValueInitExpr");
266 void VisitCXXTypeidExpr(CXXTypeidExpr *e) {
267 cgf.cgm.errorNYI(e->
getSourceRange(),
"AggExprEmitter: VisitCXXTypeidExpr");
269 void VisitMaterializeTemporaryExpr(MaterializeTemporaryExpr *e) {
271 "AggExprEmitter: VisitMaterializeTemporaryExpr");
273 void VisitOpaqueValueExpr(OpaqueValueExpr *e) {
275 "AggExprEmitter: VisitOpaqueValueExpr");
278 void VisitPseudoObjectExpr(PseudoObjectExpr *e) {
280 "AggExprEmitter: VisitPseudoObjectExpr");
283 void VisitVAArgExpr(VAArgExpr *e) {
284 cgf.cgm.errorNYI(e->
getSourceRange(),
"AggExprEmitter: VisitVAArgExpr");
287 void VisitCXXThrowExpr(
const CXXThrowExpr *e) {
288 cgf.cgm.errorNYI(e->
getSourceRange(),
"AggExprEmitter: VisitCXXThrowExpr");
290 void VisitAtomicExpr(AtomicExpr *e) {
291 cgf.cgm.errorNYI(e->
getSourceRange(),
"AggExprEmitter: VisitAtomicExpr");
304 if (
auto *ile = dyn_cast<InitListExpr>(e)) {
305 if (ile->getNumInits())
310 if (
const auto *cons = dyn_cast_or_null<CXXConstructExpr>(e))
311 return cons->getConstructor()->isDefaultConstructor() &&
312 cons->getConstructor()->isTrivial();
319void AggExprEmitter::emitAggLoadOfLValue(
const Expr *e) {
325 emitFinalDestCopy(e->
getType(), lv);
328void AggExprEmitter::emitArrayInit(Address destPtr, cir::ArrayType arrayTy,
329 QualType arrayQTy, Expr *e,
330 ArrayRef<Expr *> args, Expr *arrayFiller) {
334 const uint64_t numInitElements = args.size();
336 const QualType elementType =
340 cgf.
cgm.
errorNYI(loc,
"initialized array requires destruction");
346 const mlir::Type cirElementType = cgf.
convertType(elementType);
347 const cir::PointerType cirElementPtrType =
350 auto begin = cir::CastOp::create(builder, loc, cirElementPtrType,
351 cir::CastKind::array_to_ptrdecay,
354 const CharUnits elementSize =
356 const CharUnits elementAlign =
364 mlir::Value element = begin;
371 for (uint64_t i = 0; i != numInitElements; ++i) {
378 const Address address = Address(element, cirElementType, elementAlign);
379 const LValue elementLV = cgf.
makeAddrLValue(address, elementType);
380 emitInitializationToLValue(args[i], elementLV);
383 const uint64_t numArrayElements = arrayTy.getSize();
391 if (numInitElements != numArrayElements &&
392 !(dest.
isZeroed() && hasTrivialFiller &&
395 if (numInitElements) {
397 element = cir::PtrStrideOp::create(builder, loc, cirElementPtrType,
409 cir::ConstantOp numArrayElementsConst = builder.
getConstInt(
410 loc, mlir::cast<cir::IntType>(cgf.
PtrDiffTy), numArrayElements);
411 mlir::Value end = cir::PtrStrideOp::create(builder, loc, cirElementPtrType,
412 begin, numArrayElementsConst);
417 [&](mlir::OpBuilder &
b, mlir::Location loc) {
418 cir::LoadOp currentElement = builder.
createLoad(loc, tmpAddr);
420 cir::CmpOp cmp = cir::CmpOp::create(
421 builder, loc, boolTy, cir::CmpOpKind::ne, currentElement, end);
425 [&](mlir::OpBuilder &
b, mlir::Location loc) {
426 cir::LoadOp currentElement = builder.
createLoad(loc, tmpAddr);
432 Address(currentElement, cirElementType, elementAlign),
435 emitInitializationToLValue(arrayFiller, elementLV);
437 emitNullInitializationToLValue(loc, elementLV);
441 cgf.
cgm.
errorNYI(loc,
"update destructed array element for EH");
447 loc, mlir::cast<cir::IntType>(cgf.
PtrDiffTy), 1);
448 auto nextElement = cir::PtrStrideOp::create(
449 builder, loc, cirElementPtrType, currentElement, one);
458void AggExprEmitter::emitFinalDestCopy(QualType
type,
const LValue &src) {
473 emitCopy(
type, dest, srcAgg);
480void AggExprEmitter::emitCopy(QualType
type,
const AggValueSlot &dest,
481 const AggValueSlot &src) {
493void AggExprEmitter::emitInitializationToLValue(Expr *e, LValue lv) {
494 const QualType
type = lv.getType();
500 return emitNullInitializationToLValue(loc, lv);
506 if (
type->isReferenceType()) {
531void AggExprEmitter::VisitCXXConstructExpr(
const CXXConstructExpr *e) {
536void AggExprEmitter::emitNullInitializationToLValue(mlir::Location loc,
538 const QualType
type = lv.getType();
553 cgf.
cgm.
errorNYI(
"emitStoreThroughBitfieldLValue");
563void AggExprEmitter::VisitLambdaExpr(
LambdaExpr *e) {
566 [[maybe_unused]] LValue slotLV =
573 for (
auto [curField, capture, captureInit] : llvm::zip(
576 llvm::StringRef fieldName = curField->getName();
577 if (capture.capturesVariable()) {
578 assert(!curField->isBitField() &&
"lambdas don't have bitfield members!");
579 ValueDecl *v = capture.getCapturedVar();
582 }
else if (capture.capturesThis()) {
592 if (curField->hasCapturedVLAType())
595 emitInitializationToLValue(captureInit, lv);
599 curField->getType().isDestructedType())
604void AggExprEmitter::VisitExprWithCleanups(ExprWithCleanups *e) {
605 CIRGenFunction::RunCleanupsScope cleanups(cgf);
609void AggExprEmitter::VisitCallExpr(
const CallExpr *e) {
616 e, [&](ReturnValueSlot slot) {
return cgf.
emitCallExpr(e, slot); });
619void AggExprEmitter::withReturnValueSlot(
620 const Expr *e, llvm::function_ref<RValue(ReturnValueSlot)> fn) {
624 bool requiresDestruction =
626 if (requiresDestruction)
629 "withReturnValueSlot: return value requiring destruction is NYI");
644 fn(ReturnValueSlot(retAddr));
647void AggExprEmitter::VisitInitListExpr(InitListExpr *e) {
649 llvm_unreachable(
"GNU array range designator extension");
654 visitCXXParenListOrInitListExpr(
658void AggExprEmitter::visitCXXParenListOrInitListExpr(
659 Expr *e, ArrayRef<Expr *> args, FieldDecl *initializedFieldInUnion,
662 const AggValueSlot dest =
666 cir::ArrayType arrayTy =
673 "visitCXXParenListOrInitListExpr variable array type");
679 "visitCXXParenListOrInitListExpr array type");
689 unsigned numInitElements = args.size();
696 unsigned curInitIndex = 0;
699 if (
auto *cxxrd = dyn_cast<CXXRecordDecl>(record)) {
700 assert(numInitElements >= cxxrd->getNumBases() &&
701 "missing initializer for base class");
702 if (cxxrd->getNumBases() > 0) {
704 "visitCXXParenListOrInitListExpr base class init");
711 if (record->isUnion()) {
713 "visitCXXParenListOrInitListExpr union type");
719 for (
const FieldDecl *field : record->fields()) {
721 if (field->getType()->isIncompleteArrayType())
725 if (field->isUnnamedBitField())
731 if (curInitIndex == numInitElements && dest.
isZeroed() &&
739 if (curInitIndex < numInitElements) {
741 CIRGenFunction::SourceLocRAIIObject loc{
742 cgf, cgf.
getLoc(record->getSourceRange())};
743 emitInitializationToLValue(args[curInitIndex++], lv);
752 if (field->getType().isDestructedType()) {
754 "visitCXXParenListOrInitListExpr destructor");
778 getContext().getASTRecordLayout(baseRD).getSize() <=
787 AggExprEmitter(*
this, slot).Visit(
const_cast<Expr *
>(e));
801 assert((record->hasTrivialCopyConstructor() ||
802 record->hasTrivialCopyAssignment() ||
803 record->hasTrivialMoveConstructor() ||
804 record->hasTrivialMoveAssignment() ||
805 record->hasAttr<TrivialABIAttr>() || record->isUnion()) &&
806 "Trying to aggregate-copy a type without a trivial copy/move "
807 "constructor or assignment operator");
809 if (record->isEmpty())
832 typeInfo =
getContext().getTypeInfoDataSizeInChars(ty);
834 typeInfo =
getContext().getTypeInfoInChars(ty);
844 cgm.errorNYI(
"emitAggregateCopy: GC");
846 [[maybe_unused]] cir::CopyOp copyOp =
static bool isTrivialFiller(Expr *e)
__device__ __2f16 float __ockl_bool s
cir::ConditionOp createCondition(mlir::Value condition)
Create a loop condition.
cir::PtrStrideOp createPtrStride(mlir::Location loc, mlir::Value base, mlir::Value stride)
cir::PointerType getPointerTo(mlir::Type ty)
cir::DoWhileOp createDoWhile(mlir::Location loc, llvm::function_ref< void(mlir::OpBuilder &, mlir::Location)> condBuilder, llvm::function_ref< void(mlir::OpBuilder &, mlir::Location)> bodyBuilder)
Create a do-while operation.
cir::ConstantOp getConstantInt(mlir::Location loc, mlir::Type ty, int64_t value)
cir::YieldOp createYield(mlir::Location loc, mlir::ValueRange value={})
Create a yield operation.
QualType getPointerType(QualType T) const
Return the uniqued reference to the type for a pointer to the specified type.
const ArrayType * getAsArrayType(QualType T) const
Type Query functions.
CharUnits getTypeSizeInChars(QualType T) const
Return the size of the specified (complete) type T, in characters.
ASTRecordLayout - This class contains layout information for one RecordDecl, which is a struct/union/...
uint64_t getFieldOffset(unsigned FieldNo) const
getFieldOffset - Get the offset of the given field index, in bits.
CharUnits getBaseClassOffset(const CXXRecordDecl *Base) const
getBaseClassOffset - Get the offset, in chars, for the given base class.
CharUnits getNonVirtualSize() const
getNonVirtualSize - Get the non-virtual size (in chars) of an object, which is the size of the object...
QualType getElementType() const
mlir::Value getPointer() const
mlir::Type getElementType() const
clang::CharUnits getAlignment() const
IsZeroed_t isZeroed() const
Overlap_t mayOverlap() const
static AggValueSlot forLValue(const LValue &LV, IsDestructed_t isDestructed, IsAliased_t isAliased, Overlap_t mayOverlap, IsZeroed_t isZeroed=IsNotZeroed)
Address getAddress() const
cir::ConstantOp getConstInt(mlir::Location loc, llvm::APSInt intVal)
cir::LoadOp createLoad(mlir::Location loc, Address addr, bool isVolatile=false)
static bool hasScalarEvaluationKind(clang::QualType type)
mlir::Type convertType(clang::QualType t)
static cir::TypeEvaluationKind getEvaluationKind(clang::QualType type)
Return the cir::TypeEvaluationKind of QualType type.
CIRGenTypes & getTypes() const
const clang::LangOptions & getLangOpts() const
cir::AllocaOp createTempAlloca(mlir::Type ty, mlir::Location loc, const Twine &name="tmp", mlir::Value arraySize=nullptr, bool insertIntoFnEntryBlock=false)
This creates an alloca and inserts it into the entry block if ArraySize is nullptr,...
RValue emitCallExpr(const clang::CallExpr *e, ReturnValueSlot returnValue=ReturnValueSlot())
LValue emitLValue(const clang::Expr *e)
Emit code to compute a designator that specifies the location of the expression.
void emitStoreOfScalar(mlir::Value value, Address addr, bool isVolatile, clang::QualType ty, bool isInit=false, bool isNontemporal=false)
mlir::Location getLoc(clang::SourceLocation srcLoc)
Helpers to convert Clang's SourceLocation to a MLIR Location.
void emitNullInitialization(mlir::Location loc, Address destPtr, QualType ty)
RValue emitReferenceBindingToExpr(const Expr *e)
Emits a reference binding to the passed in expression.
AggValueSlot::Overlap_t getOverlapForFieldInit(const FieldDecl *fd)
void emitCXXConstructExpr(const clang::CXXConstructExpr *e, AggValueSlot dest)
LValue emitAggExprToLValue(const Expr *e)
static bool hasAggregateEvaluationKind(clang::QualType type)
void emitScalarInit(const clang::Expr *init, mlir::Location loc, LValue lvalue, bool capturedByInit=false)
LValue emitLValueForFieldInitialization(LValue base, const clang::FieldDecl *field, llvm::StringRef fieldName)
Like emitLValueForField, excpet that if the Field is a reference, this will return the address of the...
mlir::Value emitScalarExpr(const clang::Expr *e)
Emit the computation of the specified expression of scalar type.
CIRGenBuilderTy & getBuilder()
AggValueSlot::Overlap_t getOverlapForBaseInit(const CXXRecordDecl *rd, const CXXRecordDecl *baseRD, bool isVirtual)
Determine whether a base class initialization may overlap some other object.
void emitComplexExprIntoLValue(const Expr *e, LValue dest, bool isInit)
LValue makeAddrLValue(Address addr, QualType ty, AlignmentSource source=AlignmentSource::Type)
std::optional< mlir::Location > currSrcLoc
Use to track source locations across nested visitor traversals.
clang::ASTContext & getContext() const
void emitAggregateCopy(LValue dest, LValue src, QualType eltTy, AggValueSlot::Overlap_t mayOverlap)
Emit an aggregate copy.
void emitStoreThroughLValue(RValue src, LValue dst, bool isInit=false)
Store the specified rvalue into the specified lvalue, where both are guaranteed to the have the same ...
Address createMemTemp(QualType t, mlir::Location loc, const Twine &name="tmp", Address *alloca=nullptr, mlir::OpBuilder::InsertPoint ip={})
Create a temporary memory object of the given type, with appropriate alignmen and cast it to the defa...
void emitAggExpr(const clang::Expr *e, AggValueSlot slot)
DiagnosticBuilder errorNYI(SourceLocation, llvm::StringRef)
Helpers to emit "not yet implemented" error diagnostics.
const clang::LangOptions & getLangOpts() const
mlir::Value emitNullConstant(QualType t, mlir::Location loc)
Return the result of value-initializing the given type, i.e.
llvm::DenseMap< const clang::FieldDecl *, llvm::StringRef > lambdaFieldToName
Keep a map between lambda fields and names, this needs to be per module since lambdas might get gener...
bool isZeroInitializable(clang::QualType ty)
Return whether a type can be zero-initialized (in the C++ sense) with an LLVM zeroinitializer.
Address getAddress() const
static RValue get(mlir::Value v)
CXXTemporary * getTemporary()
const Expr * getSubExpr() const
Expr * getExpr()
Get the initialization expression that will be used.
MutableArrayRef< Expr * > getInitExprs()
FieldDecl * getInitializedFieldInUnion()
Represents a C++ struct/union/class.
SourceRange getSourceRange() const LLVM_READONLY
SourceRange getSourceRange() const LLVM_READONLY
Retrieve the source range of the expression.
SourceRange getSourceRange() const LLVM_READONLY
QualType getCallReturnType(const ASTContext &Ctx) const
getCallReturnType - Get the return type of the call expr.
CastKind getCastKind() const
static const char * getCastKindName(CastKind CK)
CharUnits alignmentOfArrayElement(CharUnits elementSize) const
Given that this is the alignment of the first element of an array, return the minimum alignment of an...
Expr * getChosenSubExpr() const
getChosenSubExpr - Return the subexpression chosen according to the condition.
InitListExpr * getUpdater() const
This represents one expression.
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
Represents a member of a struct/union/class.
unsigned getFieldIndex() const
Returns the index of this field within its record, as appropriate for passing to ASTRecordLayout::get...
const RecordDecl * getParent() const
Returns the parent of this field declaration, which is the struct in which this field is defined.
const Expr * getSubExpr() const
Expr * getResultExpr()
Return the result expression of this controlling expression.
bool isTransparent() const
Is this a transparent initializer list (that is, an InitListExpr that is purely syntactic,...
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
bool hadArrayRangeDesignator() const
Expr * getArrayFiller()
If this initializer list initializes an array with more elements than there are initializers in the l...
const Expr * getInit(unsigned Init) const
ArrayRef< Expr * > inits()
llvm::iterator_range< capture_init_iterator > capture_inits()
Retrieve the initialization expressions for this lambda's captures.
capture_range captures() const
Retrieve this lambda's captures.
CXXRecordDecl * getLambdaClass() const
Retrieve the class that corresponds to the lambda.
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
const Expr * getSubExpr() const
A (possibly-)qualified type.
bool isVolatileQualified() const
Determine whether this type is volatile-qualified.
DestructionKind isDestructedType() const
Returns a nonzero value if objects of this type require non-trivial work to clean up after.
Represents a struct/union/class.
field_range fields() const
CompoundStmt * getSubStmt()
StmtVisitor - This class implements a simple visitor for Stmt subclasses.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
CXXRecordDecl * getAsCXXRecordDecl() const
Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or beca...
bool isConstantArrayType() const
bool isReferenceType() const
bool isVariableArrayType() const
RecordDecl * castAsRecordDecl() const
bool isAnyComplexType() const
bool isRecordType() const
Expr * getSubExpr() const
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
The JSON file list parser is used to communicate input to InstallAPI.
bool isa(CodeGen::Address addr)
U cast(CodeGen::Address addr)
static bool emitLifetimeMarkers()
static bool aggValueSlotDestructedFlag()
static bool aggValueSlotGC()
static bool aggValueSlotAlias()
static bool opLoadStoreAtomic()
static bool aggEmitFinalDestCopyRValue()
static bool aggValueSlotVolatile()
static bool opScopeCleanupRegion()
static bool cudaSupport()
static bool requiresCleanups()
clang::CharUnits getPointerAlign() const