|
@@ -4935,7 +4935,7 @@ NamedDecl *Sema::HandleDeclarator(Scope *S, Declarator &D,
|
|
|
// HLSL Change Starts
|
|
|
if (getLangOpts().HLSL) {
|
|
|
const bool IsParameterFalse = false;
|
|
|
- if (!DiagnoseHLSLDecl(D, DC, TInfo, IsParameterFalse)) {
|
|
|
+ if (!DiagnoseHLSLDecl(D, DC, /*BitWidth*/ nullptr, TInfo, IsParameterFalse)) {
|
|
|
assert(D.isInvalidType() && "otherwise DiagnoseHLSLDecl failed but "
|
|
|
"didn't invalidate declaration");
|
|
|
return 0;
|
|
@@ -10271,7 +10271,7 @@ Decl *Sema::ActOnParamDeclarator(Scope *S, Declarator &D) {
|
|
|
Diag(D.getLocStart(), diag::err_hlsl_unsupported_string_decl) << selectParamIdx;
|
|
|
D.setInvalidType();
|
|
|
}
|
|
|
- if (!DiagnoseHLSLDecl(D, Context.getTranslationUnitDecl(), TInfo, IsParm)) {
|
|
|
+ if (!DiagnoseHLSLDecl(D, Context.getTranslationUnitDecl(), /*BitWidth*/ nullptr, TInfo, IsParm)) {
|
|
|
assert(D.isInvalidType() && "otherwise DiagnoseHLSLDecl failed but "
|
|
|
"didn't invalidate declaration");
|
|
|
}
|
|
@@ -12687,7 +12687,7 @@ FieldDecl *Sema::HandleField(Scope *S, RecordDecl *Record,
|
|
|
// HLSL Changes Start
|
|
|
if (getLangOpts().HLSL) {
|
|
|
const bool IsParameterFalse = false;
|
|
|
- if (!DiagnoseHLSLDecl(D, CurContext, TInfo, IsParameterFalse)) {
|
|
|
+ if (!DiagnoseHLSLDecl(D, CurContext, BitWidth, TInfo, IsParameterFalse)) {
|
|
|
// Let the diagnostic provide errors, don't actually return nullptr here;
|
|
|
// compilation will recover, which is helpful because HLSL diagnostics
|
|
|
// need not interrupt the declaration processing.
|