aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/Comment.h
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-03-01 22:51:30 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-03-01 22:51:30 +0000
commitc98e9130bcddd0258c110d30749edd2284087e3d (patch)
treeb1bef38e783e38b9a92774dd24175d9a327cbc51 /include/clang/AST/Comment.h
parentfc09336a5965040736f9bc63a70416003972364e (diff)
comment parsing. Keep the original command format
in AST for source fidelity and use it in diagnostics to refer to the original format. // rdar://13066276 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176387 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/Comment.h')
-rw-r--r--include/clang/AST/Comment.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/include/clang/AST/Comment.h b/include/clang/AST/Comment.h
index 78b703d78a..f00993bf6c 100644
--- a/include/clang/AST/Comment.h
+++ b/include/clang/AST/Comment.h
@@ -570,13 +570,16 @@ protected:
/// Paragraph argument.
ParagraphComment *Paragraph;
-
+
+ /// Header Doc command, if true
+ bool HDCommand;
+
BlockCommandComment(CommentKind K,
SourceLocation LocBegin,
SourceLocation LocEnd,
unsigned CommandID) :
BlockContentComment(K, LocBegin, LocEnd),
- Paragraph(NULL) {
+ Paragraph(NULL), HDCommand(false) {
setLocation(getCommandNameBeginLoc());
BlockCommandCommentBits.CommandID = CommandID;
}
@@ -586,7 +589,7 @@ public:
SourceLocation LocEnd,
unsigned CommandID) :
BlockContentComment(BlockCommandCommentKind, LocBegin, LocEnd),
- Paragraph(NULL) {
+ Paragraph(NULL), HDCommand(false) {
setLocation(getCommandNameBeginLoc());
BlockCommandCommentBits.CommandID = CommandID;
}
@@ -657,6 +660,14 @@ public:
if (NewLocEnd.isValid())
setSourceRange(SourceRange(getLocStart(), NewLocEnd));
}
+
+ bool getHDCommand() const LLVM_READONLY {
+ return HDCommand;
+ }
+
+ void setHDCommand(bool HDC) {
+ HDCommand = HDC;
+ }
};
/// Doxygen \\param command.