1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 
3 class C {
4 public:
5   void f(int i = 3); // expected-note{{here}}
6   void g(int i, int j = 99);
7 };
8 
f(int i=3)9 void C::f(int i = 3) { } // expected-error{{redefinition of default argument}}
10 
g(int i=88,int j)11 void C::g(int i = 88, int j) { }
12 
test_C(C c)13 void test_C(C c) {
14   c.f();
15   c.g();
16 }
17 
18 template<typename T>
19 struct X0 {
20   void f(int);
21 
22   struct Inner {
23     void g(int);
24   };
25 };
26 
27 // DR217
28 template<typename T>
f(int=17)29 void X0<T>::f(int = 17) { } // expected-error{{cannot be added}}
30 
31 // DR217 + DR205 (reading tea leaves)
32 template<typename T>
g(int=17)33 void X0<T>::Inner::g(int = 17) { } // expected-error{{cannot be added}}
34