|
@@ -8469,7 +8469,7 @@ void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr,
|
|
}
|
|
}
|
|
|
|
|
|
// HLSL Change Starts
|
|
// HLSL Change Starts
|
|
- if (getLangOpts().HLSL) {
|
|
|
|
|
|
+ if (getLangOpts().HLSL && getLangOpts().HLSLVersion > 2016) {
|
|
DiagRuntimeBehavior(BaseExpr->getLocStart(), BaseExpr,
|
|
DiagRuntimeBehavior(BaseExpr->getLocStart(), BaseExpr,
|
|
PDiag(diag::err_hlsl_array_element_index_out_of_bounds) << index.toString(10, true));
|
|
PDiag(diag::err_hlsl_array_element_index_out_of_bounds) << index.toString(10, true));
|
|
}
|
|
}
|
|
@@ -8488,7 +8488,7 @@ void Sema::CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr,
|
|
} // HLSL Change
|
|
} // HLSL Change
|
|
} else {
|
|
} else {
|
|
// HLSL Change Starts
|
|
// HLSL Change Starts
|
|
- if (getLangOpts().HLSL) {
|
|
|
|
|
|
+ if (getLangOpts().HLSL && getLangOpts().HLSLVersion > 2016) {
|
|
DiagRuntimeBehavior(BaseExpr->getLocStart(), BaseExpr,
|
|
DiagRuntimeBehavior(BaseExpr->getLocStart(), BaseExpr,
|
|
PDiag(diag::err_hlsl_array_element_index_out_of_bounds) << index.toString(10, true));
|
|
PDiag(diag::err_hlsl_array_element_index_out_of_bounds) << index.toString(10, true));
|
|
}
|
|
}
|