File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -573,7 +573,7 @@ bool clang::CreateHLSLAttributedResourceType(
573
573
assert (AttrList.size () && " expected list of resource attributes" );
574
574
575
575
QualType ContainedTy = QualType ();
576
- TypeSourceInfo *ContainedTyInfo;
576
+ TypeSourceInfo *ContainedTyInfo = nullptr ;
577
577
SourceLocation LocBegin = AttrList[0 ]->getRange ().getBegin ();
578
578
SourceLocation LocEnd = AttrList[0 ]->getRange ().getEnd ();
579
579
@@ -641,7 +641,7 @@ bool clang::CreateHLSLAttributedResourceType(
641
641
ResType = S.getASTContext ().getHLSLAttributedResourceType (
642
642
Wrapped, ContainedTy, ResAttrs);
643
643
644
- if (LocInfo) {
644
+ if (LocInfo && ContainedTyInfo ) {
645
645
LocInfo->Range = SourceRange (LocBegin, LocEnd);
646
646
LocInfo->ContainedTyInfo = ContainedTyInfo;
647
647
}
You can’t perform that action at this time.
0 commit comments