diff options
Diffstat (limited to 'lib/AST/RawCommentList.cpp')
-rw-r--r-- | lib/AST/RawCommentList.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/AST/RawCommentList.cpp b/lib/AST/RawCommentList.cpp index 06510294e7..1baa9b87eb 100644 --- a/lib/AST/RawCommentList.cpp +++ b/lib/AST/RawCommentList.cpp @@ -159,8 +159,10 @@ void RawCommentList::addComment(const RawComment &RC) { return; assert((Comments.empty() || + Comments.back().getSourceRange().getEnd() == + RC.getSourceRange().getBegin() || SourceMgr.isBeforeInTranslationUnit( - Comments[0].getSourceRange().getEnd(), + Comments.back().getSourceRange().getEnd(), RC.getSourceRange().getBegin())) && "comments are not coming in source order"); |