I got the predicate backwards in my last patch.  The comment is correct, the code was not.

llvm-svn: 47264
diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp
index e7a7041..ec34abc 100644
--- a/llvm/lib/VMCore/Function.cpp
+++ b/llvm/lib/VMCore/Function.cpp
@@ -107,7 +107,7 @@
 /// it in its containing function.
 bool Argument::hasStructRetAttr() const {
   if (!isa<PointerType>(getType())) return false;
-  if (getArgNo()) return false; // StructRet param must be first param
+  if (this != getParent()->arg_begin()) return false; // StructRet param must be first param
   return getParent()->paramHasAttr(1, ParamAttr::StructRet);
 }