Skip to content

Commit 48ea30c

Browse files
committed
add helpful comments
1 parent 6fb774a commit 48ea30c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

clang/lib/Sema/HLSLExternalSemaSource.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,10 @@ static BuiltinTypeDeclBuilder setupBufferType(CXXRecordDecl *Decl, Sema &S,
847847
.addDefaultHandleConstructor();
848848
}
849849

850+
// This function is responsible for constructing the constraint expression for
851+
// this concept:
852+
// template<typename T> concept is_typed_resource_element_compatible =
853+
// __is_typed_resource_element_compatible<T>;
850854
static Expr *constructTypedBufferConstraintExpr(Sema &S, SourceLocation NameLoc,
851855
TemplateTypeParmDecl *T) {
852856
ASTContext &Context = S.getASTContext();
@@ -868,6 +872,10 @@ static Expr *constructTypedBufferConstraintExpr(Sema &S, SourceLocation NameLoc,
868872
return TypedResExpr;
869873
}
870874

875+
// This function is responsible for constructing the constraint expression for
876+
// this concept:
877+
// template<typename T> concept is_structured_resource_element_compatible =
878+
// !__is_intangible<T> && sizeof(T) >= 1;
871879
static Expr *constructStructuredBufferConstraintExpr(Sema &S,
872880
SourceLocation NameLoc,
873881
TemplateTypeParmDecl *T) {

0 commit comments

Comments
 (0)