================ @@ -563,18 +566,23 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } -bool clang::CreateHLSLAttributedResourceType(Sema &S, QualType Wrapped, - ArrayRef<const Attr *> AttrList, - QualType &ResType) { +bool clang::CreateHLSLAttributedResourceType( + Sema &S, QualType Wrapped, ArrayRef<const Attr *> AttrList, + QualType &ResType, HLSLAttributedResourceLocInfo *LocInfo /*= nullptr*/) { assert(AttrList.size() && "expected list of resource attributes"); - QualType Contained = QualType(); + QualType ContainedTy = QualType(); + TypeSourceInfo *ContainedTyTSI; + SourceLocation LocBegin = AttrList[0]->getRange().getBegin(); + SourceLocation LocEnd = SourceLocation(); ---------------- hekota wrote:
Sure. It will get overridden when a first non-null attribute is processed, and it is guaranteed at least one attribute is going to be non-null (resource_class) or no attributed type gets created, but yes, it is cleaner to initialize it to the end position of the first attribute. 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