Use array_specifier in struct declarator parsing
This will make implementing arrays of arrays simpler for struct
members as well. Similar refactoring was already done for other types
of array declarations.
BUG=angleproject:2125
TEST=angle_unittests
Change-Id: I0483c3a7c006d37090c7c972cb3d7763d3909c8f
Reviewed-on: https://chromium-review.googlesource.com/739824
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/compiler/translator/ParseContext.cpp b/src/compiler/translator/ParseContext.cpp
index ed81eb3..43e0cad 100644
--- a/src/compiler/translator/ParseContext.cpp
+++ b/src/compiler/translator/ParseContext.cpp
@@ -4555,14 +4555,13 @@
TField *TParseContext::parseStructArrayDeclarator(TString *identifier,
const TSourceLoc &loc,
- TIntermTyped *arraySize,
+ unsigned int arraySize,
const TSourceLoc &arraySizeLoc)
{
checkIsNotReserved(loc, *identifier);
TType *type = new TType(EbtVoid, EbpUndefined);
- unsigned int size = checkIsValidArraySize(arraySizeLoc, arraySize);
- type->makeArray(size);
+ type->makeArray(arraySize);
return new TField(type, identifier, loc);
}