Commit e16eae36 by Olli Etuaho

Fix structQualifierErrorCheck calls in glslang.y

structQualifierErrorCheck is called incorrectly in glslang.y. Remove one unnecessary call entirely and change another call to samplerErrorCheck. This will enable further changes to merge structQualifierErrorCheck into singleDeclarationErrorCheck. TEST=angle_unittests BUG=angleproject:969 Change-Id: Ib43233e275fbf4db7e5fda6df6b45a655bdee8a2 Reviewed-on: https://chromium-review.googlesource.com/265200Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarOlli Etuaho <oetuaho@nvidia.com> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent ab6fc6a2
......@@ -773,7 +773,7 @@ function_header
context->recover();
}
// make sure a sampler is not involved as well...
if (context->structQualifierErrorCheck(@2, $1))
if (context->samplerErrorCheck(@2, $1, "samplers can't be function return values"))
context->recover();
// Add the function as a prototype after parsing it (we do not support recursion)
......@@ -1535,8 +1535,6 @@ condition
}
| fully_specified_type identifier EQUAL initializer {
TIntermNode* intermNode;
if (context->structQualifierErrorCheck(@2, $1))
context->recover();
if (context->boolErrorCheck(@2, $1))
context->recover();
......
......@@ -23,7 +23,7 @@
#line 26 "./glslang_lex.cpp"
#line 27 "./glslang_lex.cpp"
#define YY_INT_ALIGNED short int
......
......@@ -691,31 +691,31 @@ static const yytype_uint8 yytranslate[] =
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 210, 210, 211, 214, 238, 241, 246, 251, 256,
261, 267, 270, 273, 276, 279, 282, 288, 296, 307,
310, 318, 321, 327, 331, 338, 344, 353, 361, 367,
374, 384, 387, 390, 393, 403, 404, 405, 406, 414,
415, 418, 421, 428, 429, 432, 438, 439, 443, 450,
451, 454, 457, 460, 466, 467, 470, 476, 477, 484,
485, 492, 493, 500, 501, 507, 508, 514, 515, 521,
522, 539, 540, 548, 549, 550, 551, 555, 556, 557,
561, 565, 569, 573, 580, 583, 594, 602, 610, 637,
643, 654, 658, 662, 666, 673, 729, 732, 739, 747,
768, 789, 799, 827, 832, 842, 847, 857, 860, 863,
866, 872, 879, 882, 886, 890, 897, 901, 905, 912,
916, 920, 927, 937, 943, 946, 952, 958, 965, 974,
983, 991, 994, 1001, 1005, 1012, 1015, 1019, 1023, 1032,
1041, 1049, 1059, 1071, 1074, 1077, 1083, 1090, 1093, 1099,
1102, 1105, 1111, 1114, 1129, 1133, 1137, 1141, 1145, 1149,
1154, 1159, 1164, 1169, 1174, 1179, 1184, 1189, 1194, 1199,
1204, 1209, 1214, 1219, 1224, 1229, 1234, 1239, 1244, 1249,
1254, 1258, 1262, 1266, 1270, 1274, 1278, 1282, 1286, 1290,
1294, 1298, 1302, 1306, 1310, 1314, 1322, 1330, 1334, 1347,
1347, 1350, 1350, 1356, 1359, 1375, 1378, 1387, 1391, 1397,
1404, 1419, 1423, 1427, 1428, 1434, 1435, 1436, 1437, 1438,
1439, 1440, 1444, 1445, 1445, 1445, 1455, 1456, 1460, 1460,
1461, 1461, 1466, 1469, 1479, 1482, 1488, 1489, 1493, 1501,
1505, 1512, 1512, 1519, 1522, 1529, 1534, 1551, 1551, 1556,
0, 211, 211, 212, 215, 239, 242, 247, 252, 257,
262, 268, 271, 274, 277, 280, 283, 289, 297, 308,
311, 319, 322, 328, 332, 339, 345, 354, 362, 368,
375, 385, 388, 391, 394, 404, 405, 406, 407, 415,
416, 419, 422, 429, 430, 433, 439, 440, 444, 451,
452, 455, 458, 461, 467, 468, 471, 477, 478, 485,
486, 493, 494, 501, 502, 508, 509, 515, 516, 522,
523, 540, 541, 549, 550, 551, 552, 556, 557, 558,
562, 566, 570, 574, 581, 584, 595, 603, 611, 639,
645, 656, 660, 664, 668, 675, 731, 734, 741, 749,
770, 791, 801, 829, 834, 844, 849, 859, 862, 865,
868, 874, 881, 884, 888, 892, 899, 903, 907, 914,
918, 922, 929, 939, 945, 948, 954, 960, 967, 976,
985, 993, 996, 1003, 1007, 1014, 1017, 1021, 1025, 1034,
1043, 1051, 1061, 1073, 1076, 1079, 1085, 1092, 1095, 1101,
1104, 1107, 1113, 1116, 1131, 1135, 1139, 1143, 1147, 1151,
1156, 1161, 1166, 1171, 1176, 1181, 1186, 1191, 1196, 1201,
1206, 1211, 1216, 1221, 1226, 1231, 1236, 1241, 1246, 1251,
1256, 1260, 1264, 1268, 1272, 1276, 1280, 1284, 1288, 1292,
1296, 1300, 1304, 1308, 1312, 1316, 1324, 1332, 1336, 1349,
1349, 1352, 1352, 1358, 1361, 1377, 1380, 1389, 1393, 1399,
1406, 1421, 1425, 1429, 1430, 1436, 1437, 1438, 1439, 1440,
1441, 1442, 1446, 1447, 1447, 1447, 1457, 1458, 1462, 1462,
1463, 1463, 1468, 1471, 1481, 1484, 1490, 1491, 1495, 1503,
1507, 1514, 1514, 1521, 1524, 1531, 1536, 1551, 1551, 1556,
1556, 1563, 1563, 1571, 1574, 1580, 1583, 1589, 1593, 1600,
1603, 1606, 1609, 1612, 1621, 1625, 1632, 1635, 1641, 1641
};
......@@ -3237,7 +3237,7 @@ yyreduce:
context->recover();
}
// make sure a sampler is not involved as well...
if (context->structQualifierErrorCheck((yylsp[-1]), (yyvsp[-2].interm.type)))
if (context->samplerErrorCheck((yylsp[-1]), (yyvsp[-2].interm.type), "samplers can't be function return values"))
context->recover();
// Add the function as a prototype after parsing it (we do not support recursion)
......@@ -4606,8 +4606,6 @@ yyreduce:
{
TIntermNode* intermNode;
if (context->structQualifierErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
context->recover();
if (context->boolErrorCheck((yylsp[-2]), (yyvsp[-3].interm.type)))
context->recover();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment