Hash :
7351c2a5
Author :
Date :
2016-12-15T18:06:41
Clean up GLSL switch statement validation Encapsulate all of the implementation inside the .cpp file, and pass just the diagnostics object instead of the whole ParseContext to the validation function. BUG=angleproject:1670 TEST=angle_unittests Change-Id: I89713b63e554dbedaa12b2270208f1fac496c54e Reviewed-on: https://chromium-review.googlesource.com/420788 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
//
// Copyright (c) 2002-2015 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#ifndef COMPILER_TRANSLATOR_VALIDATESWITCH_H_
#define COMPILER_TRANSLATOR_VALIDATESWITCH_H_
#include "compiler/translator/BaseTypes.h"
#include "compiler/translator/Common.h"
namespace sh
{
class TDiagnostics;
class TIntermBlock;
// Check for errors and output error messages on the context.
// Returns true if there are no errors.
bool ValidateSwitchStatementList(TBasicType switchType,
TDiagnostics *diagnostics,
TIntermBlock *statementList,
const TSourceLoc &loc);
} // namespace sh
#endif // COMPILER_TRANSLATOR_VALIDATESWITCH_H_