diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-03-25 04:40:43 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-03-25 04:40:43 +0000 |
commit | e131c574c7baa28eb0759181478d710a2aa60cb6 (patch) | |
tree | b9e2df4ce0d458dfee3f595f6eed3d89fe387fcd /lib/Sema/SemaAccess.cpp | |
parent | 6ee765348b2855c702fa593fb030ef6abe0d01f6 (diff) |
Revert 99477 since it appears to be breaking the clang-x86_64-darwin10-fnt
buildbot. The tramp3d test fails.
--- Reverse-merging r99477 into '.':
U test/SemaTemplate/friend-template.cpp
U test/CXX/temp/temp.decls/temp.friend/p1.cpp
U lib/Sema/SemaTemplateInstantiateDecl.cpp
U lib/Sema/SemaAccess.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99481 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaAccess.cpp')
-rw-r--r-- | lib/Sema/SemaAccess.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/Sema/SemaAccess.cpp b/lib/Sema/SemaAccess.cpp index 62b13d4e95..7e2520c9ee 100644 --- a/lib/Sema/SemaAccess.cpp +++ b/lib/Sema/SemaAccess.cpp @@ -240,13 +240,13 @@ static Sema::AccessResult MatchesFriend(Sema &S, ClassTemplateDecl *Friend) { Sema::AccessResult OnFailure = Sema::AR_inaccessible; - // Check whether the friend is the template of a class in the - // context chain. for (llvm::SmallVectorImpl<CXXRecordDecl*>::const_iterator I = EC.Records.begin(), E = EC.Records.end(); I != E; ++I) { CXXRecordDecl *Record = *I; - // Figure out whether the current class has a template: + // Check whether the friend is the template of a class in the + // context chain. To do that, we need to figure out whether the + // current class has a template: ClassTemplateDecl *CTD; // A specialization of the template... @@ -264,10 +264,6 @@ static Sema::AccessResult MatchesFriend(Sema &S, if (Friend == CTD->getCanonicalDecl()) return Sema::AR_accessible; - // If the context isn't dependent, it can't be a dependent match. - if (!EC.isDependent()) - continue; - // If the template names don't match, it can't be a dependent // match. This isn't true in C++0x because of template aliases. if (!S.LangOpts.CPlusPlus0x && CTD->getDeclName() != Friend->getDeclName()) |