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 | d85bea2affdd59d83d1be7d24b97f436484c3625 (patch) | |
tree | c54ffce5ad16d80e08ccbb6ebfd047206c93ac1a /lib/Sema/SemaDeclCXX.cpp | |
parent | 74e3c92aa3eb1750ac2eb89994046eb69db39100 (diff) |
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>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82848 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 390a8048db..02c1a08c8f 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -4141,14 +4141,6 @@ Sema::DeclPtrTy Sema::ActOnFriendTypeDecl(Scope *S, break; } - // C++ [class.friend]p2: A class shall not be defined inside - // a friend declaration. - if (IsDefinition) { - Diag(DS.getFriendSpecLoc(), diag::err_friend_decl_defines_class) - << DS.getSourceRange(); - return DeclPtrTy(); - } - // C++98 [class.friend]p1: A friend of a class is a function // or class that is not a member of the class . . . // But that's a silly restriction which nobody implements for |