1a5728872c7702ddd09537c95bc3cbd20e1f2fb09Daniel Dunbar// RUN: %clang_cc1 -fsyntax-only -verify %s 26cc1518b9f15ca846b8c35518eeae9557935678dDouglas Gregor 36cc1518b9f15ca846b8c35518eeae9557935678dDouglas Gregorstruct A { 46cc1518b9f15ca846b8c35518eeae9557935678dDouglas Gregor virtual void f(int a = 7); 56cc1518b9f15ca846b8c35518eeae9557935678dDouglas Gregor}; 66cc1518b9f15ca846b8c35518eeae9557935678dDouglas Gregor 76cc1518b9f15ca846b8c35518eeae9557935678dDouglas Gregorstruct B : public A { 89aab1489866a5afe1a8a3267f9ad7124034fd644Peter Collingbourne void f(int a); // expected-note{{'f' declared here}} 96cc1518b9f15ca846b8c35518eeae9557935678dDouglas Gregor}; 106cc1518b9f15ca846b8c35518eeae9557935678dDouglas Gregor 116cc1518b9f15ca846b8c35518eeae9557935678dDouglas Gregorvoid m() { 126cc1518b9f15ca846b8c35518eeae9557935678dDouglas Gregor B* pb = new B; 136cc1518b9f15ca846b8c35518eeae9557935678dDouglas Gregor A* pa = pb; 146cc1518b9f15ca846b8c35518eeae9557935678dDouglas Gregor pa->f(); // OK, calls pa->B::f(7) 156cc1518b9f15ca846b8c35518eeae9557935678dDouglas Gregor pb->f(); // expected-error{{too few arguments}} 166cc1518b9f15ca846b8c35518eeae9557935678dDouglas Gregor} 17