Remove redundant check.

llvm-svn: 159355
This commit is contained in:
Dmitri Gribenko 2012-06-28 16:25:36 +00:00
parent df17d64881
commit 5c8897d37d
2 changed files with 3 additions and 1 deletions

View File

@ -155,6 +155,8 @@ const RawComment *ASTContext::getRawCommentForDecl(const Decl *D) const {
return Pos->second;
const RawComment *RC = getRawCommentForDeclNoCache(D);
// If we found a comment, it should be a documentation comment.
assert(!RC || RC->isDocumentation());
DeclComments[D] = RC;
return RC;
}

View File

@ -5715,7 +5715,7 @@ CXString clang_Cursor_getBriefCommentText(CXCursor C) {
const ASTContext &Context = getCursorContext(C);
const RawComment *RC = Context.getRawCommentForDecl(D);
if (RC && RC->isDocumentation()) {
if (RC) {
StringRef BriefText = RC->getBriefText(Context);
// Don't duplicate the string because RawComment ensures that this memory