summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-20 03:26:10 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-20 03:26:10 +0000
commit5be1eb8daf7b55e7999d6ae73b015a151e3709b5 (patch)
treebed54fd4cad9c4c702d21379d41ba7b1e86b15c4 /clang/lib/Sema
parent12e2a0682457450328f8835fa3a294e19e5cf6af (diff)
downloadbcm5719-llvm-5be1eb8daf7b55e7999d6ae73b015a151e3709b5.tar.gz
bcm5719-llvm-5be1eb8daf7b55e7999d6ae73b015a151e3709b5.zip
Revert r111609, which is failing its new test.
llvm-svn: 111611
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaAccess.cpp3
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp2
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp11
3 files changed, 1 insertions, 15 deletions
diff --git a/clang/lib/Sema/SemaAccess.cpp b/clang/lib/Sema/SemaAccess.cpp
index e2b7a7e061d..90d31772221 100644
--- a/clang/lib/Sema/SemaAccess.cpp
+++ b/clang/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/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 1d633a90480..19580957832 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/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/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index af852aa3406..5cfacf78b57 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/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];
OpenPOWER on IntegriCloud