From: Alexander Kornienko Date: Fri, 2 Nov 2018 15:29:37 +0000 (+0000) Subject: [clang-tidy] Fixed code sample in a comment. NFC X-Git-Tag: llvmorg-8.0.0-rc1~5131 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3444cb9993af16a4914c47a311f9eb8543abf513;p=platform%2Fupstream%2Fllvm.git [clang-tidy] Fixed code sample in a comment. NFC llvm-svn: 345984 --- diff --git a/clang-tools-extra/clang-tidy/utils/IncludeInserter.h b/clang-tools-extra/clang-tidy/utils/IncludeInserter.h index a816b92..9578649 100644 --- a/clang-tools-extra/clang-tidy/utils/IncludeInserter.h +++ b/clang-tools-extra/clang-tidy/utils/IncludeInserter.h @@ -25,16 +25,18 @@ namespace utils { /// \brief Produces fixes to insert specified includes to source files, if not /// yet present. /// -/// ``IncludeInserter`` can be used by ``ClangTidyCheck`` in the following -/// fashion: +/// ``IncludeInserter`` can be used in clang-tidy checks in the following way: /// \code +/// #include "../utils/IncludeInserter.h" +/// #include "clang/Frontend/CompilerInstance.h" +/// /// class MyCheck : public ClangTidyCheck { /// public: /// void registerPPCallbacks(CompilerInstance& Compiler) override { /// Inserter = llvm::make_unique(&Compiler.getSourceManager(), /// &Compiler.getLangOpts()); /// Compiler.getPreprocessor().addPPCallbacks( -/// Inserter->CreatePPCallback()); +/// Inserter->CreatePPCallbacks()); /// } /// /// void registerMatchers(ast_matchers::MatchFinder* Finder) override { ... } @@ -49,7 +51,7 @@ namespace utils { /// } /// /// private: -/// std::unique_ptr Inserter; +/// std::unique_ptr Inserter; /// }; /// \endcode class IncludeInserter {