From 0f359f0e356ea762359e649a17fb9920e2116f38 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Wed, 29 May 2013 22:40:31 +0000 Subject: [PATCH] Change warning to error for use of double underscore. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21765 e7fa87d3-cd2b-0410-9028-fcbf551c1848 --- glslang/MachineIndependent/IntermTraverse.cpp | 5 +++-- glslang/MachineIndependent/ParseHelper.cpp | 9 ++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/glslang/MachineIndependent/IntermTraverse.cpp b/glslang/MachineIndependent/IntermTraverse.cpp index 6c4adeb5..56598677 100644 --- a/glslang/MachineIndependent/IntermTraverse.cpp +++ b/glslang/MachineIndependent/IntermTraverse.cpp @@ -55,8 +55,9 @@ // void TIntermMethod::traverse(TIntermTraverser* it) { - // TODO: functionality: current tree should always resolve all methods as constants - // 4.3 will leave some length methods as methods + // Tree should always resolve all methods as constants + + // TODO: 4.3 functionality: some .length() will stay as methods } void TIntermSymbol::traverse(TIntermTraverser* it) diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index 9b82ae62..5861bad4 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -452,14 +452,13 @@ bool TParseContext::reservedErrorCheck(int line, const TString& identifier) if (!symbolTable.atBuiltInLevel()) { if (identifier.substr(0, 3) == TString("gl_")) { error(line, "reserved built-in name", "gl_", ""); + return true; } if (identifier.find("__") != TString::npos) { - //error(line, "Two consecutive underscores are reserved for future use.", identifier.c_str(), "", ""); - //return true; - // TODO: semantics: make this an error - infoSink.info.message(EPrefixWarning, "Two consecutive underscores are reserved for future use.", line); - return false; + error(line, "Two consecutive underscores are reserved for future use.", identifier.c_str(), "", ""); + + return true; } }