[llvm-branch-commits] [cfe-branch] r159653 - in /cfe/branches/tooling/include/clang/ASTMatchers: ASTMatchFinder.h ASTMatchersInternal.h
Manuel Klimek
klimek at google.com
Tue Jul 3 01:30:42 PDT 2012
Author: klimek
Date: Tue Jul 3 03:30:41 2012
New Revision: 159653
URL: http://llvm.org/viewvc/llvm-project?rev=159653&view=rev
Log:
More comment fixes.
Modified:
cfe/branches/tooling/include/clang/ASTMatchers/ASTMatchFinder.h
cfe/branches/tooling/include/clang/ASTMatchers/ASTMatchersInternal.h
Modified: cfe/branches/tooling/include/clang/ASTMatchers/ASTMatchFinder.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/include/clang/ASTMatchers/ASTMatchFinder.h?rev=159653&r1=159652&r2=159653&view=diff
==============================================================================
--- cfe/branches/tooling/include/clang/ASTMatchers/ASTMatchFinder.h (original)
+++ cfe/branches/tooling/include/clang/ASTMatchers/ASTMatchFinder.h Tue Jul 3 03:30:41 2012
@@ -31,7 +31,7 @@
// int main(int argc, char **argv) {
// ClangTool Tool(argc, argv);
// MatchFinder finder;
-// finder.AddMatcher(Id("id", Class(HasName("::a_namespace::AClass"))),
+// finder.AddMatcher(Id("id", record(hasName("::a_namespace::AClass"))),
// new HandleMatch);
// return Tool.Run(finder.NewFrontendActionFactory());
// }
@@ -52,10 +52,10 @@
/// \brief A class to allow finding matches over the Clang AST.
///
/// After creation, you can add multiple matchers to the MatchFinder via
-/// calls to AddMatcher(...).
+/// calls to addMatcher(...).
///
-/// Once all matchers are added, NewFrontendAction() returns a FrontendAction
-/// that will trigger the callbacks specified via AddMatcher(...) when a match
+/// Once all matchers are added, newFrontendAction() returns a FrontendAction
+/// that will trigger the callbacks specified via addMatcher(...) when a match
/// is found.
///
/// See ASTMatchers.h for more information about how to create matchers.
Modified: cfe/branches/tooling/include/clang/ASTMatchers/ASTMatchersInternal.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/include/clang/ASTMatchers/ASTMatchersInternal.h?rev=159653&r1=159652&r2=159653&view=diff
==============================================================================
--- cfe/branches/tooling/include/clang/ASTMatchers/ASTMatchersInternal.h (original)
+++ cfe/branches/tooling/include/clang/ASTMatchers/ASTMatchersInternal.h Tue Jul 3 03:30:41 2012
@@ -93,7 +93,7 @@
/// \brief Visits all matches that this BoundNodesTree represents.
///
- /// The ownership of 'visitor' remains at the caller.
+ /// The ownership of 'ResultVisitor' remains at the caller.
void visitMatches(Visitor* ResultVisitor);
private:
@@ -362,7 +362,7 @@
/// \brief Implements UntypedBaseMatcher::Matches.
///
/// Since T is guaranteed to be a "base" AST node type, this method is
- /// guaranteed to override one of the Matches() methods from
+ /// guaranteed to override one of the matches() methods from
/// UntypedBaseMatcher.
virtual bool matches(const T &Node,
ASTMatchFinder *Finder,
@@ -370,7 +370,7 @@
return InnerMatcher.matches(Node, Finder, Builder);
}
- /// \brief Implements UntypedBaseMatcher::GetID.
+ /// \brief Implements UntypedBaseMatcher::getID.
virtual uint64_t getID() const {
return InnerMatcher.getID();
}
@@ -383,10 +383,10 @@
/// FIXME: Find a better name.
///
/// This provides two entry methods for each base node type in the AST:
-/// - MatchesChildOf:
+/// - matchesChildOf:
/// Matches a matcher on every child node of the given node. Returns true
/// if at least one child node could be matched.
-/// - MatchesDescendantOf:
+/// - matchesDescendantOf:
/// Matches a matcher on all descendant nodes of the given node. Returns true
/// if at least one descendant matched.
class ASTMatchFinder {
@@ -526,14 +526,14 @@
/// \brief Matches any instance of the given NodeType.
///
/// This is useful when a matcher syntactically requires a child matcher,
-/// but the context doesn't care. See for example: True().
+/// but the context doesn't care. See for example: anything().
///
/// FIXME: Alternatively we could also create a IsAMatcher or something
/// that checks that a dyn_cast is possible. This is purely needed for the
/// difference between calling for example:
-/// Class()
+/// record()
/// and
-/// Class(SomeMatcher)
+/// record(SomeMatcher)
/// In the second case we need the correct type we were dyn_cast'ed to in order
/// to get the right type for the inner matcher. In the first case we don't need
/// that, but we use the type conversion anyway and insert a TrueMatcher.
@@ -867,8 +867,8 @@
///
/// For example:
/// const VariadicDynCastAllOfMatcher<
-/// clang::Decl, clang::CXXRecordDecl> Class;
-/// Creates a functor Class(...) that creates a Matcher<clang::Decl> given
+/// clang::Decl, clang::CXXRecordDecl> record;
+/// Creates a functor record(...) that creates a Matcher<clang::Decl> given
/// a variable number of arguments of type Matcher<clang::CXXRecordDecl>.
/// The returned matcher matches if the given clang::Decl can by dynamically
/// casted to clang::CXXRecordDecl and all given matchers match.
More information about the llvm-branch-commits
mailing list