Remove an assertion that hit on legitimate cases. A redeclaration may have location before the

first one if the redeclaration comes from a friend decl.

llvm-svn: 117537
This commit is contained in:
Argyrios Kyrtzidis 2010-10-28 07:38:53 +00:00
parent 01c2df45ff
commit 47102d885d
1 changed files with 0 additions and 6 deletions

View File

@ -1225,12 +1225,6 @@ void ASTDeclReader::VisitRedeclarable(Redeclarable<T> *D) {
= Reader.FirstLatestDeclIDs.find(ThisDeclID);
if (I != Reader.FirstLatestDeclIDs.end()) {
Decl *NewLatest = Reader.GetDecl(I->second);
assert((D->getMostRecentDeclaration()->getLocation().isInvalid() ||
NewLatest->getLocation().isInvalid() ||
!Reader.SourceMgr.isBeforeInTranslationUnit(
NewLatest->getLocation(),
D->getMostRecentDeclaration()->getLocation())) &&
"The new latest is supposed to come after the previous latest");
D->RedeclLink
= typename Redeclarable<T>::LatestDeclLink(cast_or_null<T>(NewLatest));
}