diff options
author | John McCall <rjmccall@apple.com> | 2010-10-19 01:40:49 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-10-19 01:40:49 +0000 |
commit | 9a34edb710917798aa30263374f624f13b594605 (patch) | |
tree | 5486e43a24ba1dc28b8c76b65903912f8ffb9e74 /lib/Sema/SemaTemplateInstantiateDecl.cpp | |
parent | eada35c933d8560a5d87741438a610d13d6e11d3 (diff) |
Redirect templated friend class decls to a new Sema callback and
construct an unsupported friend when there's a friend with a templated
scope specifier. Fixes a consistency crash, rdar://problem/8540527
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116786 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiateDecl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index 0b4b5101b6..57ea18809d 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -550,6 +550,7 @@ Decl *TemplateDeclInstantiator::VisitFriendDecl(FriendDecl *D) { return 0; FD->setAccess(AS_public); + FD->setUnsupportedFriend(D->isUnsupportedFriend()); Owner->addDecl(FD); return FD; } @@ -568,6 +569,7 @@ Decl *TemplateDeclInstantiator::VisitFriendDecl(FriendDecl *D) { FriendDecl::Create(SemaRef.Context, Owner, D->getLocation(), cast<NamedDecl>(NewND), D->getFriendLoc()); FD->setAccess(AS_public); + FD->setUnsupportedFriend(D->isUnsupportedFriend()); Owner->addDecl(FD); return FD; } |