From 3c7d7afd2530610e3d5678c4369731471d1bfb59 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Thu, 28 Oct 2010 07:38:53 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117537 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Serialization/ASTReaderDecl.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp index ea995af7f5..d63dce9f2b 100644 --- a/lib/Serialization/ASTReaderDecl.cpp +++ b/lib/Serialization/ASTReaderDecl.cpp @@ -1225,12 +1225,6 @@ void ASTDeclReader::VisitRedeclarable(Redeclarable *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::LatestDeclLink(cast_or_null(NewLatest)); } -- 2.40.0