mirror of
https://github.com/opnsense/src.git
synced 2026-02-28 12:20:54 -05:00
10 lines
330 B
C++
10 lines
330 B
C++
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
struct B0;
|
|
|
|
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 B0; // expected-error {{must specify 'struct' to befriend}}
|
|
friend class C; // okay
|
|
};
|