@Test public void testUIntFunctionCallReturnIndex() throws Exception { final String shader = "#version 310 es\n" + "void main() { vec3 stuff[16];" + " uint uselessOut;" + " vec3 f = stuff[uaddCarry(19u, 15u, uselessOut)];" + "}"; final String expected = "#version 310 es\n" + "void main() { vec3 stuff[16];" + " uint uselessOut;" + " vec3 f = stuff[" + Constants.GLF_MAKE_IN_BOUNDS_UINT + "(uaddCarry(19u, 15u, " + "uselessOut), 16u)];" + "}"; final TranslationUnit tu = ParseHelper.parse(shader); MakeArrayAccessesInBounds.makeInBounds(tu); assertEquals(PrettyPrinterVisitor.prettyPrintAsString(ParseHelper.parse(expected)), PrettyPrinterVisitor.prettyPrintAsString(tu)); }
public static void makeInBounds(TranslationUnit tu) { new MakeArrayAccessesInBounds(new Typer(tu)).visit(tu); }
MakeArrayAccessesInBounds extends ScopeTrackingVisitor { public static void makeInBounds(TranslationUnit tu) { new MakeArrayAccessesInBounds(new Typer(tu)).visit(tu); } }
MakeArrayAccessesInBounds extends ScopeTrackingVisitor { public static void makeInBounds(TranslationUnit tu) { new MakeArrayAccessesInBounds(new Typer(tu)).visit(tu); } private  MakeArrayAccessesInBounds(Typer typer); }
MakeArrayAccessesInBounds extends ScopeTrackingVisitor { public static void makeInBounds(TranslationUnit tu) { new MakeArrayAccessesInBounds(new Typer(tu)).visit(tu); } private  MakeArrayAccessesInBounds(Typer typer); static void makeInBounds(TranslationUnit tu); static void makeInBounds(ShaderJob shaderJob); @Override void visitArrayIndexExpr(ArrayIndexExpr arrayIndexExpr); }
MakeArrayAccessesInBounds extends ScopeTrackingVisitor { public static void makeInBounds(TranslationUnit tu) { new MakeArrayAccessesInBounds(new Typer(tu)).visit(tu); } private  MakeArrayAccessesInBounds(Typer typer); static void makeInBounds(TranslationUnit tu); static void makeInBounds(ShaderJob shaderJob); @Override void visitArrayIndexExpr(ArrayIndexExpr arrayIndexExpr);  }