diff options
Diffstat (limited to 'clang/lib/AST/RawCommentList.cpp')
-rw-r--r-- | clang/lib/AST/RawCommentList.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/AST/RawCommentList.cpp b/clang/lib/AST/RawCommentList.cpp index 06510294e77..1baa9b87eb1 100644 --- a/clang/lib/AST/RawCommentList.cpp +++ b/clang/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"); |