#include "compiler/translator/ValidateSwitch.h"
#include "compiler/translator/Diagnostics.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
namespace sh
{
namespace
{
const int kMaxAllowedTraversalDepth = …;
class ValidateSwitch : public TIntermTraverser
{ … };
bool ValidateSwitch::validate(TBasicType switchType,
TDiagnostics *diagnostics,
TIntermBlock *statementList,
const TSourceLoc &loc)
{ … }
ValidateSwitch::ValidateSwitch(TBasicType switchType, TDiagnostics *diagnostics)
: … { … }
void ValidateSwitch::visitSymbol(TIntermSymbol *)
{ … }
void ValidateSwitch::visitConstantUnion(TIntermConstantUnion *)
{ … }
bool ValidateSwitch::visitDeclaration(Visit, TIntermDeclaration *)
{ … }
bool ValidateSwitch::visitBlock(Visit visit, TIntermBlock *)
{ … }
bool ValidateSwitch::visitBinary(Visit, TIntermBinary *)
{ … }
bool ValidateSwitch::visitUnary(Visit, TIntermUnary *)
{ … }
bool ValidateSwitch::visitTernary(Visit, TIntermTernary *)
{ … }
bool ValidateSwitch::visitSwizzle(Visit, TIntermSwizzle *)
{ … }
bool ValidateSwitch::visitIfElse(Visit visit, TIntermIfElse *)
{ … }
bool ValidateSwitch::visitSwitch(Visit, TIntermSwitch *)
{ … }
bool ValidateSwitch::visitCase(Visit, TIntermCase *node)
{ … }
bool ValidateSwitch::visitAggregate(Visit visit, TIntermAggregate *)
{ … }
bool ValidateSwitch::visitLoop(Visit visit, TIntermLoop *)
{ … }
bool ValidateSwitch::visitBranch(Visit, TIntermBranch *)
{ … }
bool ValidateSwitch::validateInternal(const TSourceLoc &loc)
{ … }
}
bool ValidateSwitchStatementList(TBasicType switchType,
TDiagnostics *diagnostics,
TIntermBlock *statementList,
const TSourceLoc &loc)
{ … }
}