translator: separate declarations after rewriting loops

Otherwise when trying to add the declarations back, things might fail
because the loop initialization is a sequence and not a block.

BUG=668028

Change-Id: I8d84a25c25765e9655c16ce56604ae08f0f8176c
Reviewed-on: https://chromium-review.googlesource.com/414305
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/IntermNodePatternMatcher.h b/src/compiler/translator/IntermNodePatternMatcher.h
index 10f9657..c156100 100644
--- a/src/compiler/translator/IntermNodePatternMatcher.h
+++ b/src/compiler/translator/IntermNodePatternMatcher.h
@@ -18,6 +18,7 @@
 class TIntermBinary;
 class TIntermNode;
 class TIntermTernary;
+class TIntermDeclaration;
 
 class IntermNodePatternMatcher
 {
@@ -34,7 +35,10 @@
         kExpressionReturningArray = 0x0002,
 
         // Matches dynamic indexing of vectors or matrices in l-values.
-        kDynamicIndexingOfVectorOrMatrixInLValue = 0x0004
+        kDynamicIndexingOfVectorOrMatrixInLValue = 0x0004,
+
+        // Matches declarations with more than one declared variables
+        kMultiDeclaration = 0x0008,
     };
     IntermNodePatternMatcher(const unsigned int mask);
 
@@ -46,6 +50,7 @@
 
     bool match(TIntermAggregate *node, TIntermNode *parentNode);
     bool match(TIntermTernary *node);
+    bool match(TIntermDeclaration *node);
 
   private:
     const unsigned int mMask;