summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaAccess.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-20 01:40:01 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-20 01:40:01 +0000
commita189f2eb0ab9e7ccbf1136a7f3f9f9c541c57be5 (patch)
tree23a4e68e469c14551cb7f1085c453f117297d980 /clang/lib/Sema/SemaAccess.cpp
parent5466e751f0c911815fe62684164667bd659f60d2 (diff)
downloadbcm5719-llvm-a189f2eb0ab9e7ccbf1136a7f3f9f9c541c57be5.tar.gz
bcm5719-llvm-a189f2eb0ab9e7ccbf1136a7f3f9f9c541c57be5.zip
Detect efforts to declare a template member friend and explicitly ignore them.
Avoids a crash. llvm-svn: 111609
Diffstat (limited to 'clang/lib/Sema/SemaAccess.cpp')
-rw-r--r--clang/lib/Sema/SemaAccess.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaAccess.cpp b/clang/lib/Sema/SemaAccess.cpp
index 90d31772221..e2b7a7e061d 100644
--- a/clang/lib/Sema/SemaAccess.cpp
+++ b/clang/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());
OpenPOWER on IntegriCloud