diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 | 
| commit | 13cc256e404620c1de0cbcc4e43ce1e2dbbc4898 (patch) | |
| tree | 2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /include/clang/AST/CommentSema.h | |
| parent | 657bc3d9848e3be92029b2416031340988cd0111 (diff) | |
Diffstat (limited to 'include/clang/AST/CommentSema.h')
| -rw-r--r-- | include/clang/AST/CommentSema.h | 48 | 
1 files changed, 26 insertions, 22 deletions
| diff --git a/include/clang/AST/CommentSema.h b/include/clang/AST/CommentSema.h index e1756ca3e2f1..0340b3cfd52d 100644 --- a/include/clang/AST/CommentSema.h +++ b/include/clang/AST/CommentSema.h @@ -25,13 +25,14 @@  namespace clang {  class Decl;  class SourceMgr; +class Preprocessor;  namespace comments {  class CommandTraits;  class Sema { -  Sema(const Sema&);           // DO NOT IMPLEMENT -  void operator=(const Sema&); // DO NOT IMPLEMENT +  Sema(const Sema &) LLVM_DELETED_FUNCTION; +  void operator=(const Sema &) LLVM_DELETED_FUNCTION;    /// Allocator for AST nodes.    llvm::BumpPtrAllocator &Allocator; @@ -41,18 +42,13 @@ class Sema {    DiagnosticsEngine &Diags; -  const CommandTraits &Traits; +  CommandTraits &Traits; + +  const Preprocessor *PP;    /// Information about the declaration this comment is attached to.    DeclInfo *ThisDeclInfo; -  /// Comment AST nodes that correspond to \c ParamVars for which we have -  /// found a \\param command or NULL if no documentation was found so far. -  /// -  /// Has correct size and contains valid values if \c DeclInfo->IsFilled is -  /// true. -  llvm::SmallVector<ParamCommandComment *, 8> ParamVarDocs; -    /// Comment AST nodes that correspond to parameter names in    /// \c TemplateParameters.    /// @@ -75,7 +71,8 @@ class Sema {  public:    Sema(llvm::BumpPtrAllocator &Allocator, const SourceManager &SourceMgr, -       DiagnosticsEngine &Diags, const CommandTraits &Traits); +       DiagnosticsEngine &Diags, CommandTraits &Traits, +       const Preprocessor *PP);    void setDecl(const Decl *D); @@ -96,7 +93,7 @@ public:    BlockCommandComment *actOnBlockCommandStart(SourceLocation LocBegin,                                                SourceLocation LocEnd, -                                              StringRef Name); +                                              unsigned CommandID);    void actOnBlockCommandArgs(BlockCommandComment *Command,                               ArrayRef<BlockCommandComment::Argument> Args); @@ -106,7 +103,7 @@ public:    ParamCommandComment *actOnParamCommandStart(SourceLocation LocBegin,                                                SourceLocation LocEnd, -                                              StringRef Name); +                                              unsigned CommandID);    void actOnParamCommandDirectionArg(ParamCommandComment *Command,                                       SourceLocation ArgLocBegin, @@ -123,7 +120,7 @@ public:    TParamCommandComment *actOnTParamCommandStart(SourceLocation LocBegin,                                                  SourceLocation LocEnd, -                                                StringRef Name); +                                                unsigned CommandID);    void actOnTParamCommandParamNameArg(TParamCommandComment *Command,                                        SourceLocation ArgLocBegin, @@ -135,25 +132,29 @@ public:    InlineCommandComment *actOnInlineCommand(SourceLocation CommandLocBegin,                                             SourceLocation CommandLocEnd, -                                           StringRef CommandName); +                                           unsigned CommandID);    InlineCommandComment *actOnInlineCommand(SourceLocation CommandLocBegin,                                             SourceLocation CommandLocEnd, -                                           StringRef CommandName, +                                           unsigned CommandID,                                             SourceLocation ArgLocBegin,                                             SourceLocation ArgLocEnd,                                             StringRef Arg);    InlineContentComment *actOnUnknownCommand(SourceLocation LocBegin,                                              SourceLocation LocEnd, -                                            StringRef Name); +                                            StringRef CommandName); + +  InlineContentComment *actOnUnknownCommand(SourceLocation LocBegin, +                                            SourceLocation LocEnd, +                                            unsigned CommandID);    TextComment *actOnText(SourceLocation LocBegin,                           SourceLocation LocEnd,                           StringRef Text);    VerbatimBlockComment *actOnVerbatimBlockStart(SourceLocation Loc, -                                                StringRef Name); +                                                unsigned CommandID);    VerbatimBlockLineComment *actOnVerbatimBlockLine(SourceLocation Loc,                                                     StringRef Text); @@ -164,7 +165,7 @@ public:                                  ArrayRef<VerbatimBlockLineComment *> Lines);    VerbatimLineComment *actOnVerbatimLine(SourceLocation LocBegin, -                                         StringRef Name, +                                         unsigned CommandID,                                           SourceLocation TextBegin,                                           StringRef Text); @@ -190,6 +191,12 @@ public:    /// used only once per comment, e.g., \\brief and \\returns.    void checkBlockCommandDuplicate(const BlockCommandComment *Command); +  void checkDeprecatedCommand(const BlockCommandComment *Comment); + +  /// Resolve parameter names to parameter indexes in function declaration. +  /// Emit diagnostics about unknown parametrs. +  void resolveParamCommandIndexes(const FullComment *FC); +    bool isFunctionDecl();    bool isTemplateOrSpecialization(); @@ -218,9 +225,6 @@ public:    InlineCommandComment::RenderKind    getInlineCommandRenderKind(StringRef Name) const; - -  bool isHTMLEndTagOptional(StringRef Name); -  bool isHTMLEndTagForbidden(StringRef Name);  };  } // end namespace comments | 
