Skip to content

Commit 119def0

Browse files
committed
theoretically fix issue
1 parent bc7e5c2 commit 119def0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang/lib/Sema/SemaType.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5675,6 +5675,9 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state,
56755675
assert(!T.isNull() && "T must not be null at the end of this function");
56765676
if (!AreDeclaratorChunksValid)
56775677
return Context.getTrivialTypeSourceInfo(T);
5678+
5679+
if (state.didParseHLSLParamMod() && !T->isConstantArrayType())
5680+
T = S.HLSL().getInoutParameterType(T);
56785681
return GetTypeSourceInfoForDeclarator(state, T, TInfo);
56795682
}
56805683

@@ -8616,7 +8619,6 @@ static void HandleHLSLParamModifierAttr(TypeProcessingState &State,
86168619
return;
86178620
if (Attr.getSemanticSpelling() == HLSLParamModifierAttr::Keyword_inout ||
86188621
Attr.getSemanticSpelling() == HLSLParamModifierAttr::Keyword_out) {
8619-
CurType = S.HLSL().getInoutParameterType(CurType);
86208622
State.setParsedHLSLParamMod(true);
86218623
}
86228624
}

0 commit comments

Comments
 (0)