aboutsummaryrefslogtreecommitdiff
path: root/lib/Serialization/ASTReaderDecl.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-10-28 07:38:53 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-10-28 07:38:53 +0000
commit3c7d7afd2530610e3d5678c4369731471d1bfb59 (patch)
tree1ad99a759a74a2b2ac2c6d9d7bf127bbcd3e0fca /lib/Serialization/ASTReaderDecl.cpp
parent100050bf643bcfe2d06bdcef491e387171249260 (diff)
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
Diffstat (limited to 'lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r--lib/Serialization/ASTReaderDecl.cpp6
1 files changed, 0 insertions, 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<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));
}