diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-06-08 01:30:54 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-06-08 01:30:54 +0000 |
commit | f4fe843aac730e2202b3c9c6c52649ee186ba788 (patch) | |
tree | 2a64c9e5a94210cd50cdb4646d94c89e0287e902 /lib/Sema/SemaDecl.cpp | |
parent | 8c14de83188640bab9cae658e92a655e6d4fd484 (diff) |
Allow friend declarations of defaulted special member functions. Only
definitions of such members are prohibited, not mere declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158186 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index fdda9014dc..68f7469457 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -2039,7 +2039,7 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, Decl *OldD, Scope *S) { << New << getSpecialMember(OldMethod); return true; } - } else if (OldMethod->isExplicitlyDefaulted()) { + } else if (OldMethod->isExplicitlyDefaulted() && !isFriend) { Diag(NewMethod->getLocation(), diag::err_definition_of_explicitly_defaulted_member) << getSpecialMember(OldMethod); |