diff options
| author | John McCall <rjmccall@apple.com> | 2010-10-12 23:13:28 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-10-12 23:13:28 +0000 |
| commit | de3fd2264c1f673b4da3b001d4ad8fef2fc59132 (patch) | |
| tree | 6461e06d538f89b126902abeb0f38c3d06a92be9 /clang/lib/Sema/SemaAccess.cpp | |
| parent | 67d411ac954440c9d836e13627a3223e2665067c (diff) | |
| download | bcm5719-llvm-de3fd2264c1f673b4da3b001d4ad8fef2fc59132.tar.gz bcm5719-llvm-de3fd2264c1f673b4da3b001d4ad8fef2fc59132.zip | |
Handle dependent friends more explicitly and deal with the possibility
of templated-scope friends by marking them invalid and white-listing all
accesses until such time as we implement them. Fixes a crash, this time
without a broken test case.
llvm-svn: 116364
Diffstat (limited to 'clang/lib/Sema/SemaAccess.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaAccess.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaAccess.cpp b/clang/lib/Sema/SemaAccess.cpp index e629f0fd35b..ea6481bd8ab 100644 --- a/clang/lib/Sema/SemaAccess.cpp +++ b/clang/lib/Sema/SemaAccess.cpp @@ -516,6 +516,10 @@ 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()) + return AR_accessible; + if (TypeSourceInfo *T = FriendD->getFriendType()) return MatchesFriend(S, EC, T->getType()->getCanonicalTypeUnqualified()); |

