ThrowTheSwitch/CMock — pull request #27 by jlesage (2014-05-06 13:33:09+00:00)
Title: Fixed problem where 'ReturnThruPtr' statements were ignored with the use of 'ExpectAnyArgs'

There is a problem using `ExpectAnyArgs` in conjunction with `ReturnThruPtr`.

Once `ExpectAnyArgs` is used, any usage of `ReturnThruPtr` is ignored. This means that something like this won't work (i.e the mocked function implementation will not return data to the argument `outParam`):

```
MyFunc_ExpectAnyArgsAndReturn(0);
MyFunc_ReturnThruPtr_outParam(&testVal);
```

The problem is with the way code is generated. In the mocked function implementation, we evaluate argument expectations and after we process parameters for which we need to set data.

However, when `ExpectAnyArgs` is used, related code is placed before argument expectation evaluation and it returns immediately, thus skipping the part that sets data to pointers.

In the fix I did, instead of returning immediately, we jump after evaluation of argument expectations. This allows execution of code that returns data through arguments.