parent
df17d64881
commit
5c8897d37d
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue