[clang] [HLSL] Add implicit resource element type concepts to AST (PR #112600)

Damyan Pepper via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 17 11:33:11 PDT 2024


================
@@ -323,30 +324,99 @@ struct TemplateParameterListBuilder {
         S.Context, Builder.Record->getDeclContext(), SourceLocation(),
         SourceLocation(), /* TemplateDepth */ 0, Position,
         &S.Context.Idents.get(Name, tok::TokenKind::identifier),
-        /* Typename */ false,
-        /* ParameterPack */ false);
+        /* Typename */ true,
+        /* ParameterPack */ false,
+        /* HasTypeConstraint*/ false);
     if (!DefaultValue.isNull())
       Decl->setDefaultArgument(
           S.Context, S.getTrivialTemplateArgumentLoc(DefaultValue, QualType(),
                                                      SourceLocation()));
-
+    Decl->setReferenced();
     Params.emplace_back(Decl);
     return *this;
   }
 
-  BuiltinTypeDeclBuilder &finalizeTemplateArgs() {
+  ConceptSpecializationExpr *getConceptSpecializationExpr(Sema &S,
+                                                          ConceptDecl *CD) {
+    ASTContext &context = S.getASTContext();
+    SourceLocation loc = Builder.Record->getBeginLoc();
----------------
damyanp wrote:

```suggestion
    ASTContext &Context = S.getASTContext();
    SourceLocation Loc = Builder.Record->getBeginLoc();
```

https://github.com/llvm/llvm-project/pull/112600


More information about the cfe-commits mailing list