| 1 |
// RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 |
|
| 3 |
class test1 { |
| 4 |
template <typename> friend int bar(bool = true) {} // expected-note {{previous declaration is here}} |
| 5 |
template <typename> friend int bar(bool); // expected-error {{friend declaration specifying a default argument must be the only declaration}} |
| 6 |
}; |
| 7 |
|
| 8 |
class test2 { |
| 9 |
friend int bar(bool = true) {} // expected-note {{previous declaration is here}} |
| 10 |
friend int bar(bool); // expected-error{{friend declaration specifying a default argument must be the only declaration}} |
| 11 |
}; |