diff options
Diffstat (limited to 'test/CXX/class/class.friend/p2.cpp')
-rw-r--r-- | test/CXX/class/class.friend/p2.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/CXX/class/class.friend/p2.cpp b/test/CXX/class/class.friend/p2.cpp index f130beb7d2..98be2049e7 100644 --- a/test/CXX/class/class.friend/p2.cpp +++ b/test/CXX/class/class.friend/p2.cpp @@ -1,8 +1,10 @@ // RUN: clang-cc -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 B; // expected-error {{must specify 'class' in a friend class declaration}} + friend B0; // expected-error {{must specify 'struct' to befriend}} friend class C; // okay }; |