================
@@ -114,19 +115,30 @@ struct BuiltinTypeDeclBuilder {
                   AccessSpecifier Access = AccessSpecifier::AS_private) {
     if (Record->isCompleteDefinition())
       return *this;
+
+    TypeSourceInfo *ElementTypeTSI = nullptr;
+
     QualType Ty = Record->getASTContext().VoidPtrTy;
     if (Template) {
-      if (const auto *TTD = dyn_cast<TemplateTypeParmDecl>(
-              Template->getTemplateParameters()->getParam(0)))
+      if (const TemplateTypeParmDecl *TTD = dyn_cast<TemplateTypeParmDecl>(
+              Template->getTemplateParameters()->getParam(0))) {
         Ty = Record->getASTContext().getPointerType(
             QualType(TTD->getTypeForDecl(), 0));
+        QualType ElemType = QualType(TTD->getTypeForDecl(), 0);
+        ElementTypeTSI = S.getASTContext().getTrivialTypeSourceInfo(
+            ElemType, SourceLocation());
----------------
hekota wrote:

This SourceLocation actually does not get used, it is just there so we can 
create a TypeSourceInfo for the HLSLContainedTypeAttr. The implicit types do 
not have any source information. That will change once these types are declared 
in the implicit HLSL header.

https://github.com/llvm/llvm-project/pull/108456
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to