Give new scopes to non-compound (simple) if-then-else substatements, correcting scoping for declarations they contain.

Also, updated several tests and the Todo list.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22845 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2013-08-27 03:59:04 +00:00
parent 3af0d53dac
commit d46b31fdc5
6 changed files with 272 additions and 55 deletions

View File

@@ -11,3 +11,22 @@ void bar2(highp in float b);
smooth flat out vec4 rep; // ERROR, replicating interpolation qualification
centroid sample out vec4 rep2; // ERROR, replicating auxiliary qualification
in uniform vec4 rep3; // ERROR, replicating storage qualification
void main()
{
int i;
if (i == 3)
int j = i;
else
int k = j; // ERROR, j is undeclared
int m = k; // ERROR, k is undeclared
int n = j; // ERROR, j is undeclared
while (true)
int jj;
int kk = jj; // ERROR, jj is undeclared
}
void bar(in highp volatile vec4 v)
{
}