@@ -331,12 +331,14 @@ struct TemplateParameterListBuilder {
331331 //
332332 // template<typename T>
333333 // concept is_typed_resource_element_compatible =
334- // __builtin_hlsl_typed_resource_element_compatible<T> &&
335- // !__builtin_hlsl_is_intangible<T> template<typename element_type> requires
334+ // __builtin_hlsl_typed_resource_element_compatible<T>
335+ //
336+ // template<typename element_type> requires
336337 // is_typed_resource_element_compatible<element_type>
337338 // struct RWBuffer {
338339 // element_type Val;
339340 // };
341+ //
340342 // int fn() {
341343 // RWBuffer<int> Buf;
342344 // }
@@ -587,25 +589,7 @@ Expr *constructTypedBufferConstraintExpr(Sema &S, SourceLocation NameLoc,
587589 Context, BoolTy, NameLoc, UTT_IsTypedResourceElementCompatible,
588590 {TTypeSourceInfo}, NameLoc, true );
589591
590- TypeTraitExpr *IsIntangibleExpr =
591- TypeTraitExpr::Create (Context, BoolTy, NameLoc, UTT_IsIntangibleType,
592- {TTypeSourceInfo}, NameLoc, true );
593-
594- UnaryOperator *NotIntangibleExpr = UnaryOperator::Create (
595- Context, IsIntangibleExpr, UO_Not, BoolTy, VK_LValue, OK_Ordinary,
596- NameLoc, false , FPOptionsOverride ());
597-
598- BinaryOperator *TypedResourceConstraintExpr =
599- BinaryOperator::Create (Context, TypedResExpr, // Left-hand side expression
600- NotIntangibleExpr, // Right-hand side expression
601- BO_LAnd, // Binary operator kind (&&)
602- BoolTy, // Result type (bool)
603- VK_LValue, // Value kind
604- OK_Ordinary, // Object kind
605- NameLoc, // Source location of operator
606- FPOptionsOverride ());
607-
608- return TypedResourceConstraintExpr;
592+ return TypedResExpr;
609593}
610594
611595ConceptDecl *constructTypedBufferConceptDecl (Sema &S, NamespaceDecl *NSD) {
0 commit comments