diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-09-26 06:47:28 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-09-26 06:47:28 +0000 |
| commit | 3dad842b356adf3435b3ec4af518b4bd4a7b5cd9 (patch) | |
| tree | 18c8a7accd3d883a972b03ac50863e55439258c9 /clang/test/CXX/class/class.friend | |
| parent | ccde96e96baff2447a260d5b00f4bb4c2385265b (diff) | |
| download | bcm5719-llvm-3dad842b356adf3435b3ec4af518b4bd4a7b5cd9.tar.gz bcm5719-llvm-3dad842b356adf3435b3ec4af518b4bd4a7b5cd9.zip | |
Rework the Parse-Sema interaction for friends to better support friend
class templates. We now treat friend class templates much more like
normal class templates, except that they still get special name lookup
rules. Fixes PR5057 and eliminates a bunch of spurious diagnostics in
<iostream>.
llvm-svn: 82848
Diffstat (limited to 'clang/test/CXX/class/class.friend')
| -rw-r--r-- | clang/test/CXX/class/class.friend/p2.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/CXX/class/class.friend/p2.cpp b/clang/test/CXX/class/class.friend/p2.cpp index f130beb7d2c..98be2049e75 100644 --- a/clang/test/CXX/class/class.friend/p2.cpp +++ b/clang/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 }; |

