This is a fix to PR12778: in erroneous code an allocation function can be declared with no arguments, quering the first argument in this case causes assertion violation. llvm-svn: 190751