Generate a more descriptive error when trying to initialize a const array.
TRAC #21589
Issue=359
Signed-off-by: Daniel Koch
Signed-off-by: Shannon Woods
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1286 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/glslang_tab.cpp b/src/compiler/glslang_tab.cpp
index 2de25df..046b40f 100644
--- a/src/compiler/glslang_tab.cpp
+++ b/src/compiler/glslang_tab.cpp
@@ -3333,7 +3333,7 @@
if (context->structQualifierErrorCheck((yyvsp[(3) - (3)].lex).line, (yyval.interm).type))
context->recover();
- if (context->nonInitConstErrorCheck((yyvsp[(3) - (3)].lex).line, *(yyvsp[(3) - (3)].lex).string, (yyval.interm).type))
+ if (context->nonInitConstErrorCheck((yyvsp[(3) - (3)].lex).line, *(yyvsp[(3) - (3)].lex).string, (yyval.interm).type, false))
context->recover();
TVariable* variable = 0;
@@ -3350,7 +3350,7 @@
if (context->structQualifierErrorCheck((yyvsp[(3) - (5)].lex).line, (yyvsp[(1) - (5)].interm).type))
context->recover();
- if (context->nonInitConstErrorCheck((yyvsp[(3) - (5)].lex).line, *(yyvsp[(3) - (5)].lex).string, (yyvsp[(1) - (5)].interm).type))
+ if (context->nonInitConstErrorCheck((yyvsp[(3) - (5)].lex).line, *(yyvsp[(3) - (5)].lex).string, (yyvsp[(1) - (5)].interm).type, true))
context->recover();
(yyval.interm) = (yyvsp[(1) - (5)].interm);
@@ -3372,7 +3372,7 @@
if (context->structQualifierErrorCheck((yyvsp[(3) - (6)].lex).line, (yyvsp[(1) - (6)].interm).type))
context->recover();
- if (context->nonInitConstErrorCheck((yyvsp[(3) - (6)].lex).line, *(yyvsp[(3) - (6)].lex).string, (yyvsp[(1) - (6)].interm).type))
+ if (context->nonInitConstErrorCheck((yyvsp[(3) - (6)].lex).line, *(yyvsp[(3) - (6)].lex).string, (yyvsp[(1) - (6)].interm).type, true))
context->recover();
(yyval.interm) = (yyvsp[(1) - (6)].interm);
@@ -3435,7 +3435,7 @@
if (context->structQualifierErrorCheck((yyvsp[(2) - (2)].lex).line, (yyval.interm).type))
context->recover();
- if (context->nonInitConstErrorCheck((yyvsp[(2) - (2)].lex).line, *(yyvsp[(2) - (2)].lex).string, (yyval.interm).type))
+ if (context->nonInitConstErrorCheck((yyvsp[(2) - (2)].lex).line, *(yyvsp[(2) - (2)].lex).string, (yyval.interm).type, false))
context->recover();
(yyval.interm).type = (yyvsp[(1) - (2)].interm.type);
@@ -3474,7 +3474,7 @@
if (context->structQualifierErrorCheck((yyvsp[(2) - (5)].lex).line, (yyvsp[(1) - (5)].interm.type)))
context->recover();
- if (context->nonInitConstErrorCheck((yyvsp[(2) - (5)].lex).line, *(yyvsp[(2) - (5)].lex).string, (yyvsp[(1) - (5)].interm.type)))
+ if (context->nonInitConstErrorCheck((yyvsp[(2) - (5)].lex).line, *(yyvsp[(2) - (5)].lex).string, (yyvsp[(1) - (5)].interm.type), true))
context->recover();
(yyval.interm).type = (yyvsp[(1) - (5)].interm.type);