FunctionDecl::Create() takes as its T parameter the type of function that should be created, not the return type. Passing in the return type looks to have been copypasta'd around a bit, but the number of correct usages outweighs the incorrect ones so I've opted for keeping what T is the same and fixing up the call sites instead.
This fixes a crash in Clang when attempting to compile the following snippet of code with -fblocks -fsanitize=function -x objective-c++ (my original repro case):
void g(void(^)()); void f() { __block int a = 0; g(^(){ a++; }); }
as well as the following which only requires -fsanitize=function -x c++:
void f(char * buf) { __builtin_os_log_format(buf, ""); }