Split TIntermDeclaration from TIntermAggregate

The new class TIntermDeclaration is now used for struct, interface
block and variable declarations. TIntermDeclaration nodes do not have
a type - rather the type is stored in each child node. The types may
differ in case the declaration is a series of array declarators with
mismatching sizes.

TIntermAggregate is still used for function calls, function
prototypes, function parameter lists and invariant declarations.

BUG=angleproject:1490
TEST=angle_unittests

Change-Id: I0457188f354481470855f61ac1c878fc2579b1d1
Reviewed-on: https://chromium-review.googlesource.com/400023
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/compiler/translator/RemoveDynamicIndexing.cpp b/src/compiler/translator/RemoveDynamicIndexing.cpp
index 994ae31..ad2d08a 100644
--- a/src/compiler/translator/RemoveDynamicIndexing.cpp
+++ b/src/compiler/translator/RemoveDynamicIndexing.cpp
@@ -390,7 +390,7 @@
             // Now v_expr[s0] can be safely executed several times without unintended side effects.
 
             // Init the temp variable holding the index
-            TIntermAggregate *initIndex = createTempInitDeclaration(node->getRight());
+            TIntermDeclaration *initIndex = createTempInitDeclaration(node->getRight());
             insertStatementInParentBlock(initIndex);
             mUsedTreeInsertion = true;
 
@@ -441,7 +441,7 @@
 
                 // Store the index in a temporary signed int variable.
                 TIntermTyped *indexInitializer = EnsureSignedInt(node->getRight());
-                TIntermAggregate *initIndex = createTempInitDeclaration(indexInitializer);
+                TIntermDeclaration *initIndex  = createTempInitDeclaration(indexInitializer);
                 initIndex->setLine(node->getLine());
                 insertionsBefore.push_back(initIndex);