diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-10-20 23:48:40 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-10-20 23:48:40 +0000 |
commit | 441fff128f833c46172300e3fa815920b80420f7 (patch) | |
tree | 065ee03e87459bdd135a18c7267c8b96b6d4acf3 /lib/Serialization/ASTReaderDecl.cpp | |
parent | f093350f76320909a015c82de60a500fdcaf5b8f (diff) |
Modify the assumptions of an assert; the updated latest redeclaration can have the same location
if it's a template specialization pointing at the template.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116974 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | lib/Serialization/ASTReaderDecl.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp index af7043b270..119dbc3914 100644 --- a/lib/Serialization/ASTReaderDecl.cpp +++ b/lib/Serialization/ASTReaderDecl.cpp @@ -989,9 +989,9 @@ void ASTDeclReader::VisitRedeclarableTemplateDecl(RedeclarableTemplateDecl *D) { Decl *NewLatest = Reader.GetDecl(I->second); assert((LatestDecl->getLocation().isInvalid() || NewLatest->getLocation().isInvalid() || - Reader.SourceMgr.isBeforeInTranslationUnit( - LatestDecl->getLocation(), - NewLatest->getLocation())) && + !Reader.SourceMgr.isBeforeInTranslationUnit( + NewLatest->getLocation(), + LatestDecl->getLocation())) && "The new latest is supposed to come after the previous latest"); LatestDecl = cast<RedeclarableTemplateDecl>(NewLatest); } @@ -1203,9 +1203,9 @@ void ASTDeclReader::VisitRedeclarable(Redeclarable<T> *D) { Decl *NewLatest = Reader.GetDecl(I->second); assert((D->getMostRecentDeclaration()->getLocation().isInvalid() || NewLatest->getLocation().isInvalid() || - Reader.SourceMgr.isBeforeInTranslationUnit( - D->getMostRecentDeclaration()->getLocation(), - NewLatest->getLocation())) && + !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)); |