diff options
author | John McCall <rjmccall@apple.com> | 2010-08-20 01:40:01 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-20 01:40:01 +0000 |
commit | 29c695b86199ce917fd59b875683960a1858342a (patch) | |
tree | 5738de2342a8ffcdede6ec1c4c85b692b98ad02c /lib/Sema/SemaAccess.cpp | |
parent | 59b6dca7e5160d6f2aff42b1cf077d1cbd64e330 (diff) |
Detect efforts to declare a template member friend and explicitly ignore them.
Avoids a crash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111609 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaAccess.cpp')
-rw-r--r-- | lib/Sema/SemaAccess.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaAccess.cpp b/lib/Sema/SemaAccess.cpp index 90d3177222..e2b7a7e061 100644 --- a/lib/Sema/SemaAccess.cpp +++ b/lib/Sema/SemaAccess.cpp @@ -514,6 +514,9 @@ static AccessResult MatchesFriend(Sema &S, static AccessResult MatchesFriend(Sema &S, const EffectiveContext &EC, FriendDecl *FriendD) { + if (FriendD->isInvalidDecl()) + return AR_accessible; + if (TypeSourceInfo *T = FriendD->getFriendType()) return MatchesFriend(S, EC, T->getType()->getCanonicalTypeUnqualified()); |