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 | 2c2eb12d9c895b2174788f5068f106e5e933bbfc (patch) | |
tree | db885535fc5fa507a44cee8d9783717cf82fa1d3 /clang/lib/Sema/SemaAccess.cpp | |
parent | 622581b73bf9466eaa79deb336613e42eef7d68d (diff) | |
download | bcm5719-llvm-2c2eb12d9c895b2174788f5068f106e5e933bbfc.tar.gz bcm5719-llvm-2c2eb12d9c895b2174788f5068f106e5e933bbfc.zip |
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.
llvm-svn: 116661
Diffstat (limited to 'clang/lib/Sema/SemaAccess.cpp')
-rw-r--r-- | clang/lib/Sema/SemaAccess.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaAccess.cpp b/clang/lib/Sema/SemaAccess.cpp index ea6481bd8ab..c3a1e752105 100644 --- a/clang/lib/Sema/SemaAccess.cpp +++ b/clang/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()) |