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

@ -322,11 +322,11 @@ TSymbolTableLevel* TSymbolTableLevel::clone() const
TVariable* container = anon->getAnonContainer().clone();
container->changeName(NewPoolTString(""));
// insert the whole container
symTableLevel->insert(*container);
symTableLevel->insert(*container, false);
containerCopied[anon->getAnonId()] = true;
}
} else
symTableLevel->insert(*iter->second->clone());
symTableLevel->insert(*iter->second->clone(), false);
}
return symTableLevel;
@ -338,6 +338,7 @@ void TSymbolTable::copyTable(const TSymbolTable& copyOf)
uniqueId = copyOf.uniqueId;
noBuiltInRedeclarations = copyOf.noBuiltInRedeclarations;
separateNameSpaces = copyOf.separateNameSpaces;
for (unsigned int i = copyOf.adoptedLevels; i < copyOf.table.size(); ++i)
table.push_back(copyOf.table[i]->clone());
}