diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-20 03:26:10 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-20 03:26:10 +0000 |
commit | 72c4c15e030cabf71cffc899ca779a251bcc72d1 (patch) | |
tree | 050fc9def0224941b09feadd73b861adfba81524 /lib/Sema | |
parent | bf5e09d185275a1942223ecb58e20c2d88dcc340 (diff) |
Revert r111609, which is failing its new test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111611 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r-- | lib/Sema/SemaAccess.cpp | 3 | ||||
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 11 |
3 files changed, 1 insertions, 15 deletions
diff --git a/lib/Sema/SemaAccess.cpp b/lib/Sema/SemaAccess.cpp index e2b7a7e061..90d3177222 100644 --- a/lib/Sema/SemaAccess.cpp +++ b/lib/Sema/SemaAccess.cpp @@ -514,9 +514,6 @@ 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()); diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 1d633a9048..1958095783 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -6538,8 +6538,6 @@ Sema::ActOnFriendFunctionDecl(Scope *S, FrD->setAccess(AS_public); CurContext->addDecl(FrD); - if (ND->isInvalidDecl()) FrD->setInvalidDecl(); - return DeclPtrTy::make(ND); } diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index af852aa340..5cfacf78b5 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -1365,12 +1365,8 @@ Sema::MatchTemplateParametersToScopeSpecifier(SourceLocation DeclStartLoc, // If there were at least as many template-ids as there were template // parameter lists, then there are no template parameter lists remaining for // the declaration itself. - if (Idx >= NumParamLists) { - // Silently drop template member friend declarations. - // TODO: implement these - if (IsFriend && NumParamLists) Invalid = true; + if (Idx >= NumParamLists) return 0; - } // If there were too many template parameter lists, complain about that now. if (Idx != NumParamLists - 1) { @@ -1399,11 +1395,6 @@ Sema::MatchTemplateParametersToScopeSpecifier(SourceLocation DeclStartLoc, } } - // Silently drop template member template friend declarations. - // TODO: implement these - if (IsFriend && NumParamLists > 1) - Invalid = true; - // Return the last template parameter list, which corresponds to the // entity being declared. return ParamLists[NumParamLists - 1]; |