// 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());
x->operator float(); // expected-error{{no member named 'operator float'}}
x->operator; // expected-error{{expected a type}}
}
+
+namespace pr13157 {
+ class A { public: void operator()(int x, int y = 2, ...) {} };
+ void f() { A()(1); }
+}
\ No newline at end of file