brintos

brintos / llvm-project-archived public Read only

0
0
Text · 551 B · 0cb8b00 Raw
12 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3class 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 8class 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};12