@Test(expected = CannotRemoveReturnsException.class) public void testNoSwitch() throws Exception { final String program = "void main() { switch(2) { default: return; } }"; final TranslationUnit tu = ParseHelper.parse(program); final FunctionDefinition fd = findFunctionDefinition(tu, "main"); ReturnRemover.removeReturns(fd, ShadingLanguageVersion.GLSL_440); }
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);  }