mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 14:36:08 +00:00
Fix use of an uninitialized variable; NFC intended
This was causing debug builds with Visual Studio to fail a number of HLSL tests.
This commit is contained in:
parent
34e16b6b9c
commit
cb98fd977a
@ -573,7 +573,7 @@ bool clang::CreateHLSLAttributedResourceType(
|
||||
assert(AttrList.size() && "expected list of resource attributes");
|
||||
|
||||
QualType ContainedTy = QualType();
|
||||
TypeSourceInfo *ContainedTyInfo;
|
||||
TypeSourceInfo *ContainedTyInfo = nullptr;
|
||||
SourceLocation LocBegin = AttrList[0]->getRange().getBegin();
|
||||
SourceLocation LocEnd = AttrList[0]->getRange().getEnd();
|
||||
|
||||
@ -641,7 +641,7 @@ bool clang::CreateHLSLAttributedResourceType(
|
||||
ResType = S.getASTContext().getHLSLAttributedResourceType(
|
||||
Wrapped, ContainedTy, ResAttrs);
|
||||
|
||||
if (LocInfo) {
|
||||
if (LocInfo && ContainedTyInfo) {
|
||||
LocInfo->Range = SourceRange(LocBegin, LocEnd);
|
||||
LocInfo->ContainedTyInfo = ContainedTyInfo;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user