Fix incorrect (non-compiling) code generation for non-member functions.

--HG--
branch : clangtypes