aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2013-04-10 15:35:17 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2013-04-10 15:35:17 +0000
commit6fd7d3067dd06584ef3940e88e31fea1a0e83588 (patch)
tree30b2a0027f55979566b402c74cd329e8533d324d /lib/AST/ASTContext.cpp
parent423dd93c8011aa8bca9b761b0b121ea8bce0fd03 (diff)
Add an option to parse all comments as documentation comments
Patch by Amin Shali. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179180 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 7245c03160..170cc0298b 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -141,7 +141,9 @@ RawComment *ASTContext::getRawCommentForDeclNoCache(const Decl *D) const {
// When searching for comments during parsing, the comment we are looking
// for is usually among the last two comments we parsed -- check them
// first.
- RawComment CommentAtDeclLoc(SourceMgr, SourceRange(DeclLoc));
+ RawComment CommentAtDeclLoc(
+ SourceMgr, SourceRange(DeclLoc), false,
+ LangOpts.CommentOpts.ParseAllComments);
BeforeThanCompare<RawComment> Compare(SourceMgr);
ArrayRef<RawComment *>::iterator MaybeBeforeDecl = RawComments.end() - 1;
bool Found = Compare(*MaybeBeforeDecl, &CommentAtDeclLoc);