The (empty) return was generated without location, now it uses the location of the token ending the function }
, that's the last location the return could've been and is inserted.
Furthermore, this adds the function name to the error to make finding it easier.
With this change, the line info is not required any more.
fixes issue #2511