diff options
Diffstat (limited to 'include/clang/AST')
-rw-r--r-- | include/clang/AST/Comment.h | 17 | ||||
-rw-r--r-- | include/clang/AST/CommentLexer.h | 7 |
2 files changed, 21 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. diff --git a/include/clang/AST/CommentLexer.h b/include/clang/AST/CommentLexer.h index b90414ba01..240a8eac9a 100644 --- a/include/clang/AST/CommentLexer.h +++ b/include/clang/AST/CommentLexer.h @@ -75,6 +75,9 @@ class Token { /// unused (command spelling can be found with CommandTraits). Otherwise, /// contains the length of the string that starts at TextPtr. unsigned IntVal; + + /// This command is a Header Doc command (command starts with '@'). + bool HDCommand; public: SourceLocation getLocation() const LLVM_READONLY { return Loc; } @@ -122,6 +125,10 @@ public: return IntVal; } + bool getHDCommand() const LLVM_READONLY { + return HDCommand; + } + void setCommandID(unsigned ID) { assert(is(tok::command)); IntVal = ID; |