If the last statement is not an expression, check whether it's a return statement. If it is, remove the implicit-cast-to-void (injected by Sema to heal "return 12" for the original void return type of the wrapper) and adapt the return type of the wrapper to the type of the returned expression. I.e. void wrap() { return (void)12;} will be converted to int wrap() { return 12;}
If the last statement is not an expression, check whether it's a return statement.
If it is, remove the implicit-cast-to-void (injected by Sema to heal "return 12" for the original void return type of the wrapper) and adapt the return type of the wrapper to the type of the returned expression. I.e.
void wrap() { return (void)12;}
will be converted to
int wrap() { return 12;}

Don't search for the WrapperFD, the Transaction has it.


git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@47166 27541ba8-7e3a-0410-8455-c3a389f83636

marsupial/cling,karies/cling,karies/cling,root-mirror/cling,marsupial/cling,marsupial/cling,karies/cling,marsupial/cling,root-mirror/cling,perovic/cling,perovic/cling,karies/cling,perovic/cling,marsupial/cling,marsupial/cling,perovic/cling,root-mirror/cling,root-mirror/cling,root-mirror/cling,root-mirror/cling,perovic/cling,karies/cling,karies/cling