[PATCH] D28166: Properly merge K&R functions that have attributes
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 3 12:56:09 PST 2017
rnk added inline comments.
================
Comment at: lib/CodeGen/CodeGenFunction.h:3570
for (auto *A : llvm::make_range(Arg, ArgRange.end()))
- ArgTypes.push_back(getVarArgType(A));
+ ArgTypes.push_back(getVarArgType(A, CallArgTypeInfo == nullptr));
----------------
I'm testing this change:
```
$ git diff
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index acf8863..2662ebb 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -3571,7 +3571,8 @@ public:
// If we still have any arguments, emit them using the type of the argument.
for (auto *A : llvm::make_range(Arg, ArgRange.end()))
- ArgTypes.push_back(getVarArgType(A));
+ ArgTypes.push_back(CalleeDecl->isVariadic() ? getVarArgType(A)
+ : A->getType());
EmitCallArgs(Args, ArgTypes, ArgRange, CalleeDecl, ParamsToSkip, Order);
}
```
I'd like to fix this issue in a separate commit.
https://reviews.llvm.org/D28166
More information about the cfe-commits
mailing list