diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2012-06-28 16:25:36 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2012-06-28 16:25:36 +0000 |
commit | 5c8897d37df81cb89847bf2acfc61a06cb86cf10 (patch) | |
tree | db5df5149eb5fcb2966fd9ff2132e7c6b8b8338f | |
parent | df17d648812bae4d4eead468307fc74eee8c4f6a (diff) | |
download | bcm5719-llvm-5c8897d37df81cb89847bf2acfc61a06cb86cf10.tar.gz bcm5719-llvm-5c8897d37df81cb89847bf2acfc61a06cb86cf10.zip |
Remove redundant check.
llvm-svn: 159355
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 2 | ||||
-rw-r--r-- | clang/tools/libclang/CIndex.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 820288eae38..f208f06111e 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -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; } diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 250e9e7b2d5..c7d1523349f 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -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 |