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.cpp b/src/compiler/translator/IntermNodePatternMatcher.cpp
index dd2054f..6996c45 100644
--- a/src/compiler/translator/IntermNodePatternMatcher.cpp
+++ b/src/compiler/translator/IntermNodePatternMatcher.cpp
@@ -106,4 +106,13 @@
     return false;
 }
 
+bool IntermNodePatternMatcher::match(TIntermDeclaration *node)
+{
+    if ((mMask & kMultiDeclaration) != 0)
+    {
+        return node->getSequence()->size() > 1;
+    }
+    return false;
+}
+
 }  // namespace sh