Add constructors for TMemoryQualifier and TLayoutQualifier.

These replace the ::create methods, to facilitate constexpr versions.
Also adds a constructor of WorkGroupSize that can be made to be
constexpr.

Bug: angleproject:1432
Change-Id: I413d1a56102c94d6a383775110a2b850a7532ea0
Reviewed-on: https://chromium-review.googlesource.com/776279
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
diff --git a/src/compiler/translator/ParseContext.cpp b/src/compiler/translator/ParseContext.cpp
index 523228a..be47819 100644
--- a/src/compiler/translator/ParseContext.cpp
+++ b/src/compiler/translator/ParseContext.cpp
@@ -218,6 +218,7 @@
       mMinProgramTextureGatherOffset(resources.MinProgramTextureGatherOffset),
       mMaxProgramTextureGatherOffset(resources.MaxProgramTextureGatherOffset),
       mComputeShaderLocalSizeDeclared(false),
+      mComputeShaderLocalSize(-1),
       mNumViews(-1),
       mMaxNumViews(resources.MaxViewsOVR),
       mMaxImageUnits(resources.MaxImageUnits),
@@ -235,7 +236,6 @@
       mMaxGeometryShaderMaxVertices(resources.MaxGeometryOutputVertices),
       mGeometryShaderInputArraySize(0u)
 {
-    mComputeShaderLocalSize.fill(-1);
 }
 
 TParseContext::~TParseContext()
@@ -1757,7 +1757,7 @@
 
 sh::WorkGroupSize TParseContext::getComputeShaderLocalSize() const
 {
-    sh::WorkGroupSize result;
+    sh::WorkGroupSize result(-1);
     for (size_t i = 0u; i < result.size(); ++i)
     {
         if (mComputeShaderLocalSizeDeclared && mComputeShaderLocalSize[i] == -1)
@@ -4208,7 +4208,7 @@
 TLayoutQualifier TParseContext::parseLayoutQualifier(const TString &qualifierType,
                                                      const TSourceLoc &qualifierTypeLine)
 {
-    TLayoutQualifier qualifier = TLayoutQualifier::create();
+    TLayoutQualifier qualifier = TLayoutQualifier::Create();
 
     if (qualifierType == "shared")
     {
@@ -4449,7 +4449,7 @@
                                                      int intValue,
                                                      const TSourceLoc &intValueLine)
 {
-    TLayoutQualifier qualifier = TLayoutQualifier::create();
+    TLayoutQualifier qualifier = TLayoutQualifier::Create();
 
     std::string intValueString = Str(intValue);