Skip to content

Commit f50b917

Browse files
committed
clarify comment, add concept AST test
1 parent 1722578 commit f50b917

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

clang/lib/Sema/HLSLExternalSemaSource.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,9 @@ struct TemplateParameterListBuilder {
374374
TemplateTypeParmDecl *ConceptTTPD = dyn_cast<TemplateTypeParmDecl>(
375375
CD->getTemplateParameters()->getParam(0));
376376

377-
// this fake TemplateTypeParmDecl is used to construct a template argument
378-
// that will be used to construct the ImplicitConceptSpecializationDecl
377+
// this TemplateTypeParmDecl is the template for the resource, and is
378+
// used to construct a template argumentthat will be used
379+
// to construct the ImplicitConceptSpecializationDecl
379380
TemplateTypeParmDecl *T = TemplateTypeParmDecl::Create(
380381
Context, // AST context
381382
Context.getTranslationUnitDecl(), // DeclContext
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump -ast-dump-filter=__is_typed_resource_element_compatible %s | FileCheck %s
2+
3+
// CHECK: ConceptDecl 0x{{[0-9a-f]+}} <<invalid sloc>> <invalid sloc> __is_typed_resource_element_compatible
4+
// CHECK: |-TemplateTypeParmDecl 0x{{[0-9a-f]+}} <<invalid sloc>> <invalid sloc> referenced typename depth 0 index 0 element_type
5+
// CHECK: `-BinaryOperator 0x{{[0-9a-f]+}} <<invalid sloc>> 'bool' lvalue '<='
6+
// CHECK: |-UnaryExprOrTypeTraitExpr 0x{{[0-9a-f]+}} <<invalid sloc>> 'unsigned long' sizeof 'element_type'
7+
// CHECK: `-IntegerLiteral 0x{{[0-9a-f]+}} <<invalid sloc>> 'unsigned long' 16
8+
9+
10+
RWBuffer<float> Buffer;

0 commit comments

Comments
 (0)