Skip to content

Commit 94d0a3c

Browse files
committed
[clang][Interp][NFC] Add comments to Descriptor ctors
I can't tell these apart every time I look at them.
1 parent 58c9ef5 commit 94d0a3c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clang/lib/AST/Interp/Descriptor.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ static BlockMoveFn getMoveArrayPrim(PrimType Type) {
221221
COMPOSITE_TYPE_SWITCH(Type, return moveArrayTy<T>, return nullptr);
222222
}
223223

224+
/// Primitives.
224225
Descriptor::Descriptor(const DeclTy &D, PrimType Type, MetadataSize MD,
225226
bool IsConst, bool IsTemporary, bool IsMutable)
226227
: Source(D), ElemSize(primSize(Type)), Size(ElemSize),
@@ -231,6 +232,7 @@ Descriptor::Descriptor(const DeclTy &D, PrimType Type, MetadataSize MD,
231232
assert(Source && "Missing source");
232233
}
233234

235+
/// Primitive arrays.
234236
Descriptor::Descriptor(const DeclTy &D, PrimType Type, MetadataSize MD,
235237
size_t NumElems, bool IsConst, bool IsTemporary,
236238
bool IsMutable)
@@ -243,6 +245,7 @@ Descriptor::Descriptor(const DeclTy &D, PrimType Type, MetadataSize MD,
243245
assert(Source && "Missing source");
244246
}
245247

248+
/// Primitive unknown-size arrays.
246249
Descriptor::Descriptor(const DeclTy &D, PrimType Type, bool IsTemporary,
247250
UnknownSize)
248251
: Source(D), ElemSize(primSize(Type)), Size(UnknownSizeMark), MDSize(0),
@@ -252,6 +255,7 @@ Descriptor::Descriptor(const DeclTy &D, PrimType Type, bool IsTemporary,
252255
assert(Source && "Missing source");
253256
}
254257

258+
/// Arrays of composite elements.
255259
Descriptor::Descriptor(const DeclTy &D, Descriptor *Elem, MetadataSize MD,
256260
unsigned NumElems, bool IsConst, bool IsTemporary,
257261
bool IsMutable)
@@ -264,6 +268,7 @@ Descriptor::Descriptor(const DeclTy &D, Descriptor *Elem, MetadataSize MD,
264268
assert(Source && "Missing source");
265269
}
266270

271+
/// Unknown-size arrays of composite elements.
267272
Descriptor::Descriptor(const DeclTy &D, Descriptor *Elem, bool IsTemporary,
268273
UnknownSize)
269274
: Source(D), ElemSize(Elem->getAllocSize() + sizeof(InlineDescriptor)),
@@ -274,6 +279,7 @@ Descriptor::Descriptor(const DeclTy &D, Descriptor *Elem, bool IsTemporary,
274279
assert(Source && "Missing source");
275280
}
276281

282+
/// Composite records.
277283
Descriptor::Descriptor(const DeclTy &D, Record *R, MetadataSize MD,
278284
bool IsConst, bool IsTemporary, bool IsMutable)
279285
: Source(D), ElemSize(std::max<size_t>(alignof(void *), R->getFullSize())),

0 commit comments

Comments
 (0)