Ignore __restrict when check overload.
This commit is contained in:
Родитель
00351f3f94
Коммит
524697bf66
|
@ -4866,6 +4866,7 @@ TryObjectArgumentInitialization(Sema &S, QualType FromType,
|
|||
// First check the qualifiers.
|
||||
QualType FromTypeCanon = S.Context.getCanonicalType(FromType);
|
||||
// HLSL Change Starts - for calls other than subscript overloads, disregard const
|
||||
FromTypeCanon.removeLocalRestrict(); // HLSL Change - disregard restrict.
|
||||
if (!S.getLangOpts().HLSL ||
|
||||
(Method != nullptr && Method->getDeclName() == S.Context.DeclarationNames.getCXXOperatorName(OO_Subscript))) {
|
||||
// HLSL Change Ends
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
// RUN: %dxc -T lib_6_1 %s | FileCheck %s
|
||||
|
||||
// Make sure subscript on inout vector works.
|
||||
// CHECK: noalias
|
||||
|
||||
struct A {
|
||||
float2 s;
|
||||
int2 i;
|
||||
};
|
||||
|
||||
float test(inout A a) {
|
||||
return a.s[1];
|
||||
}
|
Загрузка…
Ссылка в новой задаче