google / graphicsfuzz

A testing framework for automatically finding and simplifying bugs in graphics shader compilers.
Apache License 2.0
570 stars 117 forks source link

Adding Method call (array.length()) support #1148

Closed AaronGhost closed 3 years ago

AaronGhost commented 3 years ago

Attempting to parse a shader containing a method (array.length()) raises an UnsupportedLanguageFeatureException.

#version 320 es
void main() {
 int var_0[5] = int[5](1,2,3,4,5);
 int var_1 = var_0.length();
}

It is possible to build an AST containing such method by hand using the MemberLookUpExpr, however, attempts to use the Typer with an AST containing such expression fails as the MemberLookupExpr will not be typed.