[PATCH] D17462: Fix a codegen bug for variadic functions with pass_object_size params
George Burgess IV via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 22 18:31:38 PDT 2016
george.burgess.iv added inline comments.
Comment at: lib/CodeGen/CGCall.cpp:142-143
@@ -132,1 +141,4 @@
+ appendParameterTypes(CGT, prefix, FTP, FD, &SynthesizedParams);
+ RequiredArgs Required =
+ RequiredArgs::forPrototypePlus(FTP, StartParams + SynthesizedParams);
CanQualType resultType = FTP->getReturnType().getUnqualifiedType();
> Would it make sense for `RequiredArgs::forPrototypePlus` to do this computation? Are the other callers of that function also getting the wrong number of required arguments in this case?
...There was a reason I didn't do that. I don't remember what it was, so either it disappeared, or I was just being dumb, but there was a reason. Either way, I moved this logic into `RequiredArgs`, and ended up fixing a few more bugs in the process. Yay for (fixing) bugs!
More information about the cfe-commits