Add missing check that a function call is not using the same name as a variable hiding the function's name. Also, support version 110 separate name spaces for functions and variable names.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24480 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-12-11 22:38:19 +00:00
parent 623833fabc
commit 3a4687d782
17 changed files with 576 additions and 285 deletions

View file

@ -2904,6 +2904,11 @@ const TFunction* TParseContext::findFunction(TSourceLoc loc, const TFunction& ca
{
const TFunction* function = 0;
if (symbolTable.isFunctionNameVariable(call.getName())) {
error(loc, "can't use function syntax on variable", call.getName().c_str(), "");
return 0;
}
if (profile == EEsProfile || version < 120)
function = findFunctionExact(loc, call, builtIn);
else if (version < 400)