@Test public void testNoReturnNoOp() throws Exception { final String program = "void foo() {" + " int x = 2;" + " x++;" + "}"; final TranslationUnit tu = ParseHelper.parse(program); final FunctionDefinition fd = findFunctionDefinition(tu, "foo"); ReturnRemover.removeReturns(fd, ShadingLanguageVersion.ESSL_300); CompareAstsDuplicate.assertEqualAsts(program, tu); }
public static void removeReturns(FunctionDefinition fd, ShadingLanguageVersion shadingLanguageVersion) throws CannotRemoveReturnsException { new ReturnRemover(fd, shadingLanguageVersion).doRemoveReturns(); }
ReturnRemover { public static void removeReturns(FunctionDefinition fd, ShadingLanguageVersion shadingLanguageVersion) throws CannotRemoveReturnsException { new ReturnRemover(fd, shadingLanguageVersion).doRemoveReturns(); } }
ReturnRemover { public static void removeReturns(FunctionDefinition fd, ShadingLanguageVersion shadingLanguageVersion) throws CannotRemoveReturnsException { new ReturnRemover(fd, shadingLanguageVersion).doRemoveReturns(); } private  ReturnRemover(FunctionDefinition fd, ShadingLanguageVersion shadingLanguageVersion); }
ReturnRemover { public static void removeReturns(FunctionDefinition fd, ShadingLanguageVersion shadingLanguageVersion) throws CannotRemoveReturnsException { new ReturnRemover(fd, shadingLanguageVersion).doRemoveReturns(); } private  ReturnRemover(FunctionDefinition fd, ShadingLanguageVersion shadingLanguageVersion); static void removeReturns(FunctionDefinition fd, ShadingLanguageVersion
      shadingLanguageVersion); }
ReturnRemover { public static void removeReturns(FunctionDefinition fd, ShadingLanguageVersion shadingLanguageVersion) throws CannotRemoveReturnsException { new ReturnRemover(fd, shadingLanguageVersion).doRemoveReturns(); } private  ReturnRemover(FunctionDefinition fd, ShadingLanguageVersion shadingLanguageVersion); static void removeReturns(FunctionDefinition fd, ShadingLanguageVersion
      shadingLanguageVersion);  }