aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2012-07-20 20:40:35 +0000
committerAaron Ballman <aaron@aaronballman.com>2012-07-20 20:40:35 +0000
commit4914c2897bb8beb5e15b2a0bf3e72d78da0706ae (patch)
treecd88505d4143a5ed215f2adad950839e6a13a5d0 /lib/Sema/SemaOverload.cpp
parent9f08f49929324ec6863e81b22a43fb2e8575b433 (diff)
No longer assuming the number of prototype arguments is always less than the number of formal parameters for a variadic function call.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160570 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r--lib/Sema/SemaOverload.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index 9420b73d8b..b80e374b60 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -10998,7 +10998,7 @@ Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Obj,
// If this is a variadic call, handle args passed through "...".
if (Proto->isVariadic()) {
// Promote the arguments (C99 6.5.2.2p7).
- for (unsigned i = NumArgsInProto; i != NumArgs; i++) {
+ for (unsigned i = NumArgsInProto; i < NumArgs; i++) {
ExprResult Arg = DefaultVariadicArgumentPromotion(Args[i], VariadicMethod, 0);
IsError |= Arg.isInvalid();
TheCall->setArg(i + 1, Arg.take());