diff options
Diffstat (limited to 'include/clang/ASTMatchers/ASTMatchFinder.h')
-rw-r--r-- | include/clang/ASTMatchers/ASTMatchFinder.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/include/clang/ASTMatchers/ASTMatchFinder.h b/include/clang/ASTMatchers/ASTMatchFinder.h index 389af1b6e259a..324c02db3fe06 100644 --- a/include/clang/ASTMatchers/ASTMatchFinder.h +++ b/include/clang/ASTMatchers/ASTMatchFinder.h @@ -50,7 +50,7 @@ namespace clang { namespace ast_matchers { -/// \brief A class to allow finding matches over the Clang AST. +/// A class to allow finding matches over the Clang AST. /// /// After creation, you can add multiple matchers to the MatchFinder via /// calls to addMatcher(...). @@ -68,52 +68,52 @@ namespace ast_matchers { /// Not intended to be subclassed. class MatchFinder { public: - /// \brief Contains all information for a given match. + /// Contains all information for a given match. /// /// Every time a match is found, the MatchFinder will invoke the registered /// MatchCallback with a MatchResult containing information about the match. struct MatchResult { MatchResult(const BoundNodes &Nodes, clang::ASTContext *Context); - /// \brief Contains the nodes bound on the current match. + /// Contains the nodes bound on the current match. /// /// This allows user code to easily extract matched AST nodes. const BoundNodes Nodes; - /// \brief Utilities for interpreting the matched AST structures. + /// Utilities for interpreting the matched AST structures. /// @{ clang::ASTContext * const Context; clang::SourceManager * const SourceManager; /// @} }; - /// \brief Called when the Match registered for it was successfully found + /// Called when the Match registered for it was successfully found /// in the AST. class MatchCallback { public: virtual ~MatchCallback(); - /// \brief Called on every match by the \c MatchFinder. + /// Called on every match by the \c MatchFinder. virtual void run(const MatchResult &Result) = 0; - /// \brief Called at the start of each translation unit. + /// Called at the start of each translation unit. /// /// Optionally override to do per translation unit tasks. virtual void onStartOfTranslationUnit() {} - /// \brief Called at the end of each translation unit. + /// Called at the end of each translation unit. /// /// Optionally override to do per translation unit tasks. virtual void onEndOfTranslationUnit() {} - /// \brief An id used to group the matchers. + /// An id used to group the matchers. /// /// This id is used, for example, for the profiling output. /// It defaults to "<unknown>". virtual StringRef getID() const; }; - /// \brief Called when parsing is finished. Intended for testing only. + /// Called when parsing is finished. Intended for testing only. class ParsingDoneTestCallback { public: virtual ~ParsingDoneTestCallback(); @@ -125,11 +125,11 @@ public: Profiling(llvm::StringMap<llvm::TimeRecord> &Records) : Records(Records) {} - /// \brief Per bucket timing information. + /// Per bucket timing information. llvm::StringMap<llvm::TimeRecord> &Records; }; - /// \brief Enables per-check timers. + /// Enables per-check timers. /// /// It prints a report after match. llvm::Optional<Profiling> CheckProfiling; @@ -138,7 +138,7 @@ public: MatchFinder(MatchFinderOptions Options = MatchFinderOptions()); ~MatchFinder(); - /// \brief Adds a matcher to execute when running over the AST. + /// Adds a matcher to execute when running over the AST. /// /// Calls 'Action' with the BoundNodes on every match. /// Adding more than one 'NodeMatch' allows finding different matches in a @@ -162,7 +162,7 @@ public: MatchCallback *Action); /// @} - /// \brief Adds a matcher to execute when running over the AST. + /// Adds a matcher to execute when running over the AST. /// /// This is similar to \c addMatcher(), but it uses the dynamic interface. It /// is more flexible, but the lost type information enables a caller to pass @@ -173,10 +173,10 @@ public: bool addDynamicMatcher(const internal::DynTypedMatcher &NodeMatch, MatchCallback *Action); - /// \brief Creates a clang ASTConsumer that finds all matches. + /// Creates a clang ASTConsumer that finds all matches. std::unique_ptr<clang::ASTConsumer> newASTConsumer(); - /// \brief Calls the registered callbacks on all matches on the given \p Node. + /// Calls the registered callbacks on all matches on the given \p Node. /// /// Note that there can be multiple matches on a single node, for /// example when using decl(forEachDescendant(stmt())). @@ -189,17 +189,17 @@ public: ASTContext &Context); /// @} - /// \brief Finds all matches in the given AST. + /// Finds all matches in the given AST. void matchAST(ASTContext &Context); - /// \brief Registers a callback to notify the end of parsing. + /// Registers a callback to notify the end of parsing. /// /// The provided closure is called after parsing is done, before the AST is /// traversed. Useful for benchmarking. /// Each call to FindAll(...) will call the closure once. void registerTestCallbackAfterParsing(ParsingDoneTestCallback *ParsingDone); - /// \brief For each \c Matcher<> a \c MatchCallback that will be called + /// For each \c Matcher<> a \c MatchCallback that will be called /// when it matches. struct MatchersByType { std::vector<std::pair<internal::DynTypedMatcher, MatchCallback *>> @@ -211,7 +211,7 @@ public: NestedNameSpecifierLoc; std::vector<std::pair<TypeLocMatcher, MatchCallback *>> TypeLoc; std::vector<std::pair<CXXCtorInitializerMatcher, MatchCallback *>> CtorInit; - /// \brief All the callbacks in one container to simplify iteration. + /// All the callbacks in one container to simplify iteration. llvm::SmallPtrSet<MatchCallback *, 16> AllCallbacks; }; @@ -220,11 +220,11 @@ private: MatchFinderOptions Options; - /// \brief Called when parsing is done. + /// Called when parsing is done. ParsingDoneTestCallback *ParsingDone; }; -/// \brief Returns the results of matching \p Matcher on \p Node. +/// Returns the results of matching \p Matcher on \p Node. /// /// Collects the \c BoundNodes of all callback invocations when matching /// \p Matcher on \p Node and returns the collected results. @@ -248,12 +248,12 @@ match(MatcherT Matcher, const ast_type_traits::DynTypedNode &Node, ASTContext &Context); /// @} -/// \brief Returns the results of matching \p Matcher on the translation unit of +/// Returns the results of matching \p Matcher on the translation unit of /// \p Context and collects the \c BoundNodes of all callback invocations. template <typename MatcherT> SmallVector<BoundNodes, 1> match(MatcherT Matcher, ASTContext &Context); -/// \brief Returns the first result of type \c NodeT bound to \p BoundTo. +/// Returns the first result of type \c NodeT bound to \p BoundTo. /// /// Returns \c NULL if there is no match, or if the matching node cannot be /// casted to \c NodeT. |