diff options
| author | Alexander Kornienko <alexfh@google.com> | 2016-06-17 11:43:33 +0000 | 
|---|---|---|
| committer | Alexander Kornienko <alexfh@google.com> | 2016-06-17 11:43:33 +0000 | 
| commit | c9c8290251c6d254a29aa8957f8f31dac46e896b (patch) | |
| tree | 9e2754fd0fc6ab8db3401f0eb39dd2aef12ce9f3 | |
| parent | 2150390a2ad2c063fa408626c5682c951dbafc69 (diff) | |
| download | bcm5719-llvm-c9c8290251c6d254a29aa8957f8f31dac46e896b.tar.gz bcm5719-llvm-c9c8290251c6d254a29aa8957f8f31dac46e896b.zip  | |
[clang-tidy] Fix doxygen errors. NFC.
llvm-svn: 272994
10 files changed, 72 insertions, 58 deletions
diff --git a/clang-tools-extra/clang-tidy/ClangTidy.h b/clang-tools-extra/clang-tidy/ClangTidy.h index 24a54d72591..5c2721cde65 100644 --- a/clang-tools-extra/clang-tidy/ClangTidy.h +++ b/clang-tools-extra/clang-tidy/ClangTidy.h @@ -94,11 +94,11 @@ private:  /// base class's methods. E.g. to implement a check that validates namespace  /// declarations, override ``registerMatchers``:  /// -/// ```c++ +/// ~~~{.cpp}  /// void registerMatchers(ast_matchers::MatchFinder *Finder) override {  ///   Finder->addMatcher(namespaceDecl().bind("namespace"), this);  /// } -/// ``` +/// ~~~  ///  /// and then override ``check(const MatchResult &Result)`` to do the actual  /// check for each match. @@ -127,7 +127,7 @@ public:    /// dependent properties, e.g. the order of include directives.    virtual void registerPPCallbacks(CompilerInstance &Compiler) {} -  /// \brief Override this to register ASTMatchers with \p Finder. +  /// \brief Override this to register AST matchers with \p Finder.    ///    /// This should be used by clang-tidy checks that analyze code properties that    /// dependent on AST knowledge. diff --git a/clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.h b/clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.h index d8f814d4af7..ee7254e336c 100644 --- a/clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.h +++ b/clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.h @@ -20,11 +20,16 @@ namespace modernize {  /// alternatives.  ///  /// Before: -///   #include <header.h> +/// ~~~{.cpp} +/// #include <header.h> +/// ~~~ +///  /// After: -///   #include <cheader> +/// ~~~{.cpp} +/// #include <cheader> +/// ~~~  /// -/// Example: <stdio.h> => <cstdio> +/// Example: ``<stdio.h> => <cstdio>``  ///  /// For the user-facing documentation see:  /// http://clang.llvm.org/extra/clang-tidy/checks/modernize-deprecated-headers.html diff --git a/clang-tools-extra/clang-tidy/readability/UniqueptrDeleteReleaseCheck.h b/clang-tools-extra/clang-tidy/readability/UniqueptrDeleteReleaseCheck.h index b38ee6c4d82..43ca22d822b 100644 --- a/clang-tools-extra/clang-tidy/readability/UniqueptrDeleteReleaseCheck.h +++ b/clang-tools-extra/clang-tidy/readability/UniqueptrDeleteReleaseCheck.h @@ -16,8 +16,8 @@ namespace clang {  namespace tidy {  namespace readability { -/// Flag statements of the form: delete <unique_ptr expr>.release() -/// and replace them with: <unique_ptr expr> = nullptr +/// Flags statements of the form ``delete <unique_ptr expr>.release();`` and +/// replaces them with: ``<unique_ptr expr> = nullptr;``  ///  /// For the user-facing documentation see:  /// http://clang.llvm.org/extra/clang-tidy/checks/readability-uniqueptr-delete-release.html diff --git a/clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.h b/clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.h index fe07552cf83..15595c193c1 100644 --- a/clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.h +++ b/clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.h @@ -18,11 +18,12 @@ namespace tidy {  namespace utils {  namespace decl_ref_expr { -/// \brief Returns true if all DeclRefExpr to the variable within Stmt do not -/// modify it. +/// \brief Returns true if all ``DeclRefExpr`` to the variable within ``Stmt`` +/// do not modify it.  /// -/// Returns true if only const methods or operators are called on the variable -/// or the variable is a const reference or value argument to a callExpr(). +/// Returns ``true`` if only const methods or operators are called on the +/// variable or the variable is a const reference or value argument to a +/// ``callExpr()``.  bool isOnlyUsedAsConst(const VarDecl &Var, const Stmt &Stmt,                         ASTContext &Context); diff --git a/clang-tools-extra/clang-tidy/utils/FixItHintUtils.h b/clang-tools-extra/clang-tidy/utils/FixItHintUtils.h index 70c5afcb982..e64a6e41673 100644 --- a/clang-tools-extra/clang-tidy/utils/FixItHintUtils.h +++ b/clang-tools-extra/clang-tidy/utils/FixItHintUtils.h @@ -18,10 +18,10 @@ namespace tidy {  namespace utils {  namespace fixit { -/// \brief Creates fix to make VarDecl a reference by adding '&'. +/// \brief Creates fix to make ``VarDecl`` a reference by adding ``&``.  FixItHint changeVarDeclToReference(const VarDecl &Var, ASTContext &Context); -/// \brief Creates fix to make VarDecl const qualified. +/// \brief Creates fix to make ``VarDecl`` const qualified.  FixItHint changeVarDeclToConst(const VarDecl &Var);  } // namespace fixit diff --git a/clang-tools-extra/clang-tidy/utils/HeaderFileExtensionsUtils.h b/clang-tools-extra/clang-tidy/utils/HeaderFileExtensionsUtils.h index 8ce3c57f1cf..70bdc812091 100644 --- a/clang-tools-extra/clang-tidy/utils/HeaderFileExtensionsUtils.h +++ b/clang-tools-extra/clang-tidy/utils/HeaderFileExtensionsUtils.h @@ -21,17 +21,17 @@ namespace utils {  typedef llvm::SmallSet<llvm::StringRef, 5> HeaderFileExtensionsSet; -/// \brief Checks whether expansion location of Loc is in header file. +/// \brief Checks whether expansion location of \p Loc is in header file.  bool isExpansionLocInHeaderFile(      SourceLocation Loc, const SourceManager &SM,      const HeaderFileExtensionsSet &HeaderFileExtensions); -/// \brief Checks whether presumed location of Loc is in header file. +/// \brief Checks whether presumed location of \p Loc is in header file.  bool isPresumedLocInHeaderFile(      SourceLocation Loc, SourceManager &SM,      const HeaderFileExtensionsSet &HeaderFileExtensions); -/// \brief Checks whether spelling location of Loc is in header file. +/// \brief Checks whether spelling location of \p Loc is in header file.  bool isSpellingLocInHeaderFile(      SourceLocation Loc, SourceManager &SM,      const HeaderFileExtensionsSet &HeaderFileExtensions); diff --git a/clang-tools-extra/clang-tidy/utils/HeaderGuard.h b/clang-tools-extra/clang-tidy/utils/HeaderGuard.h index a745e56c34b..cb88f083e3f 100644 --- a/clang-tools-extra/clang-tidy/utils/HeaderGuard.h +++ b/clang-tools-extra/clang-tidy/utils/HeaderGuard.h @@ -23,20 +23,20 @@ public:        : ClangTidyCheck(Name, Context) {}    void registerPPCallbacks(CompilerInstance &Compiler) override; -  /// \brief Returns true if the checker should suggest inserting a trailing -  /// comment on the #endif of the header guard. It will use the same name as -  /// returned by getHeaderGuard. +  /// Returns ``true`` if the check should suggest inserting a trailing comment +  /// on the ``#endif`` of the header guard. It will use the same name as +  /// returned by ``HeaderGuardCheck::getHeaderGuard``.    virtual bool shouldSuggestEndifComment(StringRef Filename); -  /// \brief Returns true if the checker should suggest changing an existing -  /// header guard to the string returned by getHeaderGuard. +  /// Returns ``true`` if the check should suggest changing an existing header +  /// guard to the string returned by ``HeaderGuardCheck::getHeaderGuard``.    virtual bool shouldFixHeaderGuard(StringRef Filename); -  /// \brief Returns true if the checker should add a header guard to the file +  /// Returns ``true`` if the check should add a header guard to the file    /// if it has none.    virtual bool shouldSuggestToAddHeaderGuard(StringRef Filename); -  /// \brief Returns a replacement for endif line with a comment mentioning -  /// \p HeaderGuard. The replacement should start with "endif". +  /// Returns a replacement for the ``#endif`` line with a comment mentioning +  /// \p HeaderGuard. The replacement should start with ``endif``.    virtual std::string formatEndIf(StringRef HeaderGuard); -  /// \brief Get the canonical header guard for a file. +  /// Gets the canonical header guard for a file.    virtual std::string getHeaderGuard(StringRef Filename,                                       StringRef OldGuard = StringRef()) = 0;  }; diff --git a/clang-tools-extra/clang-tidy/utils/IncludeInserter.h b/clang-tools-extra/clang-tidy/utils/IncludeInserter.h index 23bba966f6a..75f2554b372 100644 --- a/clang-tools-extra/clang-tidy/utils/IncludeInserter.h +++ b/clang-tools-extra/clang-tidy/utils/IncludeInserter.h @@ -22,40 +22,47 @@ namespace clang {  namespace tidy {  namespace utils { -// IncludeInserter can be used by ClangTidyChecks in the following fashion: -// class MyCheck : public ClangTidyCheck { -//  public: -//   void registerPPCallbacks(CompilerInstance& Compiler) override { -//     Inserter.reset(new IncludeInserter(&Compiler.getSourceManager(), -//                                        &Compiler.getLangOpts())); -//     Compiler.getPreprocessor().addPPCallbacks( -//         Inserter->CreatePPCallback()); -//   } -// -//   void registerMatchers(ast_matchers::MatchFinder* Finder) override { ... } -// -//   void check(const ast_matchers::MatchFinder::MatchResult& Result) override { -//     ... -//     Inserter->CreateIncludeInsertion( -//         Result.SourceManager->getMainFileID(), "path/to/Header.h", -//         /*IsAngled=*/false); -//     ... -//   } -// -//  private: -//   std::unique_ptr<IncludeInserter> Inserter; -// }; +/// \brief Produces fixes to insert specified includes to source files, if not +/// yet present. +/// +/// ``IncludeInserter`` can be used by ``ClangTidyCheck`` in the following +/// fashion: +/// \code +/// class MyCheck : public ClangTidyCheck { +///  public: +///   void registerPPCallbacks(CompilerInstance& Compiler) override { +///     Inserter.reset(new IncludeInserter(&Compiler.getSourceManager(), +///                                        &Compiler.getLangOpts())); +///     Compiler.getPreprocessor().addPPCallbacks( +///         Inserter->CreatePPCallback()); +///   } +/// +///   void registerMatchers(ast_matchers::MatchFinder* Finder) override { ... } +/// +///   void check( +///       const ast_matchers::MatchFinder::MatchResult& Result) override { +///     ... +///     Inserter->CreateIncludeInsertion( +///         Result.SourceManager->getMainFileID(), "path/to/Header.h", +///         /*IsAngled=*/false); +///     ... +///   } +/// +///  private: +///   std::unique_ptr<IncludeInserter> Inserter; +/// }; +/// \endcode  class IncludeInserter {  public:    IncludeInserter(const SourceManager &SourceMgr, const LangOptions &LangOpts,                    IncludeSorter::IncludeStyle Style);    ~IncludeInserter(); -  // Create PPCallbacks for registration with the compiler's preprocessor. +  /// Create ``PPCallbacks`` for registration with the compiler's preprocessor.    std::unique_ptr<PPCallbacks> CreatePPCallbacks(); -  // Creates a Header inclusion directive fixit. Returns None on error or -  // if inclusion directive already exists. +  /// Creates a \p Header inclusion directive fixit. Returns ``llvm::None`` on +  /// error or if inclusion directive already exists.    llvm::Optional<FixItHint>    CreateIncludeInsertion(FileID FileID, llvm::StringRef Header, bool IsAngled); diff --git a/clang-tools-extra/clang-tidy/utils/TypeTraits.h b/clang-tools-extra/clang-tidy/utils/TypeTraits.h index 8fde9d1a761..096c65bac99 100644 --- a/clang-tools-extra/clang-tidy/utils/TypeTraits.h +++ b/clang-tools-extra/clang-tidy/utils/TypeTraits.h @@ -18,14 +18,14 @@ namespace tidy {  namespace utils {  namespace type_traits { -// \brief Returns true If \c Type is expensive to copy. +/// Returns `true` if `Type` is expensive to copy.  llvm::Optional<bool> isExpensiveToCopy(QualType Type,                                         const ASTContext &Context); -// \brief Returns true If \c Type is trivially default constructible. +/// Returns `true` if `Type` is trivially default constructible.  bool isTriviallyDefaultConstructible(QualType Type, const ASTContext &Context); -// \brief Returns true If \c RecordDecl is trivially default constructible. +/// Returns `true` if `RecordDecl` is trivially default constructible.  bool recordIsTriviallyDefaultConstructible(const RecordDecl &RecordDecl,                                             const ASTContext &Context); diff --git a/clang-tools-extra/docs/doxygen.cfg.in b/clang-tools-extra/docs/doxygen.cfg.in index 47054fcc2da..56e96a676fb 100644 --- a/clang-tools-extra/docs/doxygen.cfg.in +++ b/clang-tools-extra/docs/doxygen.cfg.in @@ -819,7 +819,7 @@ EXCLUDE_SYMBOLS        =  # that contain example code fragments that are included (see the \include  # command). -EXAMPLE_PATH           = @abs_srcdir@/../examples +EXAMPLE_PATH           =  # If the value of the EXAMPLE_PATH tag contains directories, you can use the  # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and @@ -839,7 +839,7 @@ EXAMPLE_RECURSIVE      = YES  # that contain images that are to be included in the documentation (see the  # \image command). -IMAGE_PATH             = @abs_srcdir@/img +IMAGE_PATH             =  # The INPUT_FILTER tag can be used to specify a program that doxygen should  # invoke to filter for each input file. Doxygen will invoke the filter program @@ -1913,7 +1913,8 @@ SEARCH_INCLUDES        = YES  # preprocessor.  # This tag requires that the tag SEARCH_INCLUDES is set to YES. -INCLUDE_PATH           = ../include +INCLUDE_PATH           = @abs_srcdir@/../../../include \ +                         @abs_srcdir@/../../../../../include  # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard  # patterns (like *.h and *.hpp) to filter out the header-files in the  | 

