aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/class/class.friend/p2.cpp
blob: f130beb7d2c3fb53b754217871fd9edab74ff882 (plain)
1
2
3
4
5
6
7
8
// RUN: clang-cc -fsyntax-only -verify %s

class A {
  friend class B {}; // expected-error {{cannot define a type in a friend declaration}}
  friend int; // expected-error {{friends can only be classes or functions}}
  friend B; // expected-error {{must specify 'class' in a friend class declaration}}
  friend class C; // okay
};