summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/RawCommentList.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
commita7d16ceee604c25b096fa05dfd307aa5fac65b21 (patch)
treeeeaa2904f503b8940078e3c24505301453ebe342 /clang/lib/AST/RawCommentList.cpp
parent641c9bcfd53837e80c942d44e99f57756d54de8e (diff)
downloadbcm5719-llvm-a7d16ceee604c25b096fa05dfd307aa5fac65b21.tar.gz
bcm5719-llvm-a7d16ceee604c25b096fa05dfd307aa5fac65b21.zip
Add an option to parse all comments as documentation comments
Patch by Amin Shali. llvm-svn: 179180
Diffstat (limited to 'clang/lib/AST/RawCommentList.cpp')
-rw-r--r--clang/lib/AST/RawCommentList.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/AST/RawCommentList.cpp b/clang/lib/AST/RawCommentList.cpp
index f2386a56fcc..78164593806 100644
--- a/clang/lib/AST/RawCommentList.cpp
+++ b/clang/lib/AST/RawCommentList.cpp
@@ -63,9 +63,10 @@ bool mergedCommentIsTrailingComment(StringRef Comment) {
} // unnamed namespace
RawComment::RawComment(const SourceManager &SourceMgr, SourceRange SR,
- bool Merged) :
+ bool Merged, bool ParseAllComments) :
Range(SR), RawTextValid(false), BriefTextValid(false),
IsAttached(false), IsAlmostTrailingComment(false),
+ ParseAllComments(ParseAllComments),
BeginLineValid(false), EndLineValid(false) {
// Extract raw comment text, if possible.
if (SR.getBegin() == SR.getEnd() || getRawText(SourceMgr).empty()) {
@@ -253,7 +254,8 @@ void RawCommentList::addComment(const RawComment &RC,
if (C1EndLine + 1 == C2BeginLine || C1EndLine == C2BeginLine) {
SourceRange MergedRange(C1.getSourceRange().getBegin(),
C2.getSourceRange().getEnd());
- *Comments.back() = RawComment(SourceMgr, MergedRange, true);
+ *Comments.back() = RawComment(SourceMgr, MergedRange, true,
+ RC.isParseAllComments());
Merged = true;
}
}
@@ -262,4 +264,3 @@ void RawCommentList::addComment(const RawComment &RC,
OnlyWhitespaceSeen = true;
}
-
OpenPOWER on IntegriCloud