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 | 63d45e51fb22ff452b1e19a992858fc861369a37 (patch) | |
| tree | 21aa5077c8a9b9af2c37070b69d541bfda4248f9 /clang/lib/Sema/SemaAccess.cpp | |
| parent | 4d745dd5cb3c3167ec5cf1f238b9e083c3658c4e (diff) | |
| download | bcm5719-llvm-63d45e51fb22ff452b1e19a992858fc861369a37.tar.gz bcm5719-llvm-63d45e51fb22ff452b1e19a992858fc861369a37.zip | |
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
llvm-svn: 99481
Diffstat (limited to 'clang/lib/Sema/SemaAccess.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaAccess.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaAccess.cpp b/clang/lib/Sema/SemaAccess.cpp index 62b13d4e95b..7e2520c9eee 100644 --- a/clang/lib/Sema/SemaAccess.cpp +++ b/clang/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()) |

