diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-18 18:33:57 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-18 18:33:57 +0000 |
commit | f106f0ee3ba0c81d4c56f7935f518da53d78c08e (patch) | |
tree | 7ab929caab3201e8d2a0f5c1e9a14b1752185d3a /lib/Sema/SemaDeclCXX.cpp | |
parent | c19981c2711c9b0564bc1a9cbad4b2d0cca608d5 (diff) |
In C++11, a class's members are allowed to be nominated as friends.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142393 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index a39584a107..38bce96360 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -10045,7 +10045,7 @@ Decl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D, // C++ [class.friend]p1: A friend of a class is a function or // class that is not a member of the class . . . - if (DC->Equals(CurContext)) + if (DC->Equals(CurContext) && !getLangOptions().CPlusPlus0x) Diag(DS.getFriendSpecLoc(), diag::err_friend_is_member); if (D.isFunctionDefinition()) { |