diff options
author | John McCall <rjmccall@apple.com> | 2010-10-16 06:59:13 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-10-16 06:59:13 +0000 |
commit | 6102ca1d490836096678d7d934f0b2b78f9293ec (patch) | |
tree | 6d041c075fd523574c5c35fe985aa38d698d5b43 /lib/Sema/SemaAccess.cpp | |
parent | b10ce9f4fcff51bebc9efaeda2fa15b6478c6aec (diff) |
White-listing templated-scope friend decls is a good idea, but doing it
by marking the decl invalid isn't. Make some steps towards supporting these
and then hastily shut them down at the last second by marking them as
unsupported.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116661 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaAccess.cpp')
-rw-r--r-- | lib/Sema/SemaAccess.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaAccess.cpp b/lib/Sema/SemaAccess.cpp index ea6481bd8a..c3a1e75210 100644 --- a/lib/Sema/SemaAccess.cpp +++ b/lib/Sema/SemaAccess.cpp @@ -516,8 +516,9 @@ static AccessResult MatchesFriend(Sema &S, static AccessResult MatchesFriend(Sema &S, const EffectiveContext &EC, FriendDecl *FriendD) { - // Whitelist accesses if there's an invalid friend declaration. - if (FriendD->isInvalidDecl()) + // Whitelist accesses if there's an invalid or unsupported friend + // declaration. + if (FriendD->isInvalidDecl() || FriendD->isUnsupportedFriend()) return AR_accessible; if (TypeSourceInfo *T = FriendD->getFriendType()) |