diff options
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index a2de53ca0c1..814f914ec71 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -255,6 +255,7 @@ RawComment *ASTContext::getRawCommentForDeclNoCache(const Decl *D) const { SourceMgr.getLineNumber(DeclLocDecomp.first, DeclLocDecomp.second) == SourceMgr.getLineNumber(CommentBeginDecomp.first, CommentBeginDecomp.second)) { + (**Comment).setAttached(); return *Comment; } } @@ -296,6 +297,7 @@ RawComment *ASTContext::getRawCommentForDeclNoCache(const Decl *D) const { if (Text.find_first_of(";{}#@") != StringRef::npos) return nullptr; + (**Comment).setAttached(); return *Comment; } |