diff options
Diffstat (limited to 'include/clang/Tooling/Tooling.h')
-rw-r--r-- | include/clang/Tooling/Tooling.h | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/include/clang/Tooling/Tooling.h b/include/clang/Tooling/Tooling.h index 781691218c..ac58696c1c 100644 --- a/include/clang/Tooling/Tooling.h +++ b/include/clang/Tooling/Tooling.h @@ -67,7 +67,7 @@ namespace tooling { class CompilationDatabase; -/// \brief Interface to process a clang::CompilerInvocation. +/// Interface to process a clang::CompilerInvocation. /// /// If your tool is based on FrontendAction, you should be deriving from /// FrontendActionFactory instead. @@ -75,7 +75,7 @@ class ToolAction { public: virtual ~ToolAction(); - /// \brief Perform an action for an invocation. + /// Perform an action for an invocation. virtual bool runInvocation(std::shared_ptr<CompilerInvocation> Invocation, FileManager *Files, @@ -83,7 +83,7 @@ public: DiagnosticConsumer *DiagConsumer) = 0; }; -/// \brief Interface to generate clang::FrontendActions. +/// Interface to generate clang::FrontendActions. /// /// Having a factory interface allows, for example, a new FrontendAction to be /// created for each translation unit processed by ClangTool. This class is @@ -93,19 +93,19 @@ class FrontendActionFactory : public ToolAction { public: ~FrontendActionFactory() override; - /// \brief Invokes the compiler with a FrontendAction created by create(). + /// Invokes the compiler with a FrontendAction created by create(). bool runInvocation(std::shared_ptr<CompilerInvocation> Invocation, FileManager *Files, std::shared_ptr<PCHContainerOperations> PCHContainerOps, DiagnosticConsumer *DiagConsumer) override; - /// \brief Returns a new clang::FrontendAction. + /// Returns a new clang::FrontendAction. /// /// The caller takes ownership of the returned action. virtual FrontendAction *create() = 0; }; -/// \brief Returns a new FrontendActionFactory for a given type. +/// Returns a new FrontendActionFactory for a given type. /// /// T must derive from clang::FrontendAction. /// @@ -115,25 +115,25 @@ public: template <typename T> std::unique_ptr<FrontendActionFactory> newFrontendActionFactory(); -/// \brief Callbacks called before and after each source file processed by a +/// Callbacks called before and after each source file processed by a /// FrontendAction created by the FrontedActionFactory returned by \c /// newFrontendActionFactory. class SourceFileCallbacks { public: virtual ~SourceFileCallbacks() = default; - /// \brief Called before a source file is processed by a FrontEndAction. + /// Called before a source file is processed by a FrontEndAction. /// \see clang::FrontendAction::BeginSourceFileAction virtual bool handleBeginSource(CompilerInstance &CI) { return true; } - /// \brief Called after a source file is processed by a FrontendAction. + /// Called after a source file is processed by a FrontendAction. /// \see clang::FrontendAction::EndSourceFileAction virtual void handleEndSource() {} }; -/// \brief Returns a new FrontendActionFactory for any type that provides an +/// Returns a new FrontendActionFactory for any type that provides an /// implementation of newASTConsumer(). /// /// FactoryT must implement: ASTConsumer *newASTConsumer(). @@ -148,7 +148,7 @@ template <typename FactoryT> inline std::unique_ptr<FrontendActionFactory> newFrontendActionFactory( FactoryT *ConsumerFactory, SourceFileCallbacks *Callbacks = nullptr); -/// \brief Runs (and deletes) the tool on 'Code' with the -fsyntax-only flag. +/// Runs (and deletes) the tool on 'Code' with the -fsyntax-only flag. /// /// \param ToolAction The action to run over the code. /// \param Code C++ code. @@ -166,7 +166,7 @@ bool runToolOnCode(FrontendAction *ToolAction, const Twine &Code, /// file-content. using FileContentMappings = std::vector<std::pair<std::string, std::string>>; -/// \brief Runs (and deletes) the tool on 'Code' with the -fsyntax-only flag and +/// Runs (and deletes) the tool on 'Code' with the -fsyntax-only flag and /// with additional other flags. /// /// \param ToolAction The action to run over the code. @@ -187,7 +187,7 @@ bool runToolOnCodeWithArgs( std::make_shared<PCHContainerOperations>(), const FileContentMappings &VirtualMappedFiles = FileContentMappings()); -/// \brief Builds an AST for 'Code'. +/// Builds an AST for 'Code'. /// /// \param Code C++ code. /// \param FileName The file name which 'Code' will be mapped as. @@ -200,7 +200,7 @@ buildASTFromCode(const Twine &Code, const Twine &FileName = "input.cc", std::shared_ptr<PCHContainerOperations> PCHContainerOps = std::make_shared<PCHContainerOperations>()); -/// \brief Builds an AST for 'Code' with additional flags. +/// Builds an AST for 'Code' with additional flags. /// /// \param Code C++ code. /// \param Args Additional flags to pass on. @@ -220,10 +220,10 @@ std::unique_ptr<ASTUnit> buildASTFromCodeWithArgs( std::make_shared<PCHContainerOperations>(), ArgumentsAdjuster Adjuster = getClangStripDependencyFileAdjuster()); -/// \brief Utility to run a FrontendAction in a single clang invocation. +/// Utility to run a FrontendAction in a single clang invocation. class ToolInvocation { public: - /// \brief Create a tool invocation. + /// Create a tool invocation. /// /// \param CommandLine The command line arguments to clang. Note that clang /// uses its binary name (CommandLine[0]) to locate its builtin headers. @@ -239,7 +239,7 @@ public: std::shared_ptr<PCHContainerOperations> PCHContainerOps = std::make_shared<PCHContainerOperations>()); - /// \brief Create a tool invocation. + /// Create a tool invocation. /// /// \param CommandLine The command line arguments to clang. /// \param Action The action to be executed. @@ -252,19 +252,19 @@ public: ~ToolInvocation(); - /// \brief Set a \c DiagnosticConsumer to use during parsing. + /// Set a \c DiagnosticConsumer to use during parsing. void setDiagnosticConsumer(DiagnosticConsumer *DiagConsumer) { this->DiagConsumer = DiagConsumer; } - /// \brief Map a virtual file to be used while running the tool. + /// Map a virtual file to be used while running the tool. /// /// \param FilePath The path at which the content will be mapped. /// \param Content A null terminated buffer of the file's content. // FIXME: remove this when all users have migrated! void mapVirtualFile(StringRef FilePath, StringRef Content); - /// \brief Run the clang invocation. + /// Run the clang invocation. /// /// \returns True if there were no errors during execution. bool run(); @@ -287,7 +287,7 @@ public: DiagnosticConsumer *DiagConsumer = nullptr; }; -/// \brief Utility to run a FrontendAction over a set of files. +/// Utility to run a FrontendAction over a set of files. /// /// This class is written to be usable for command line utilities. /// By default the class uses ClangSyntaxOnlyAdjuster to modify @@ -296,7 +296,7 @@ public: /// arguments adjuster by calling the appendArgumentsAdjuster() method. class ClangTool { public: - /// \brief Constructs a clang tool to run over a list of files. + /// Constructs a clang tool to run over a list of files. /// /// \param Compilations The CompilationDatabase which contains the compile /// command lines for the given source paths. @@ -315,24 +315,24 @@ public: ~ClangTool(); - /// \brief Set a \c DiagnosticConsumer to use during parsing. + /// Set a \c DiagnosticConsumer to use during parsing. void setDiagnosticConsumer(DiagnosticConsumer *DiagConsumer) { this->DiagConsumer = DiagConsumer; } - /// \brief Map a virtual file to be used while running the tool. + /// Map a virtual file to be used while running the tool. /// /// \param FilePath The path at which the content will be mapped. /// \param Content A null terminated buffer of the file's content. void mapVirtualFile(StringRef FilePath, StringRef Content); - /// \brief Append a command line arguments adjuster to the adjuster chain. + /// Append a command line arguments adjuster to the adjuster chain. /// /// \param Adjuster An argument adjuster, which will be run on the output of /// previous argument adjusters. void appendArgumentsAdjuster(ArgumentsAdjuster Adjuster); - /// \brief Clear the command line arguments adjuster chain. + /// Clear the command line arguments adjuster chain. void clearArgumentsAdjusters(); /// Runs an action over all files specified in the command line. @@ -343,11 +343,11 @@ public: /// some files are skipped due to missing compile commands. int run(ToolAction *Action); - /// \brief Create an AST for each file specified in the command line and + /// Create an AST for each file specified in the command line and /// append them to ASTs. int buildASTs(std::vector<std::unique_ptr<ASTUnit>> &ASTs); - /// \brief Returns the file manager used in the tool. + /// Returns the file manager used in the tool. /// /// The file manager is shared between all translation units. FileManager &getFiles() { return *Files; } @@ -436,7 +436,7 @@ inline std::unique_ptr<FrontendActionFactory> newFrontendActionFactory( new FrontendActionFactoryAdapter(ConsumerFactory, Callbacks)); } -/// \brief Returns the absolute path of \c File, by prepending it with +/// Returns the absolute path of \c File, by prepending it with /// the current directory if \c File is not absolute. /// /// Otherwise returns \c File. @@ -450,7 +450,7 @@ inline std::unique_ptr<FrontendActionFactory> newFrontendActionFactory( /// \param File Either an absolute or relative path. std::string getAbsolutePath(StringRef File); -/// \brief Changes CommandLine to contain implicit flags that would have been +/// Changes CommandLine to contain implicit flags that would have been /// defined had the compiler driver been invoked through the path InvokedAs. /// /// For example, when called with \c InvokedAs set to `i686-linux-android-g++`, @@ -473,7 +473,7 @@ std::string getAbsolutePath(StringRef File); void addTargetAndModeForProgramName(std::vector<std::string> &CommandLine, StringRef InvokedAs); -/// \brief Creates a \c CompilerInvocation. +/// Creates a \c CompilerInvocation. CompilerInvocation *newInvocation(DiagnosticsEngine *Diagnostics, const llvm::opt::ArgStringList &CC1Args); |