Index: include/clang/ASTMatchers/ASTMatchers.h =================================================================== --- include/clang/ASTMatchers/ASTMatchers.h +++ include/clang/ASTMatchers/ASTMatchers.h @@ -800,7 +800,7 @@ /// A b; /// A c; /// -/// template f() {}; +/// template void f() {}; /// void func() { f(); }; /// \endcode /// classTemplateSpecializationDecl(hasTemplateArgument( @@ -880,12 +880,12 @@ /// /// Given /// \code -/// template struct A {}; -/// struct B { B* next; }; +/// struct B { int next; }; +/// template struct A {}; /// A<&B::next> a; /// \endcode /// classTemplateSpecializationDecl(hasAnyTemplateArgument( -/// refersToDeclaration(fieldDecl(hasName("next")))) +/// refersToDeclaration(fieldDecl(hasName("next"))))) /// matches the specialization \c A<&B::next> with \c fieldDecl(...) matching /// \c B::next AST_MATCHER_P(TemplateArgument, refersToDeclaration, @@ -899,8 +899,8 @@ /// /// Given /// \code -/// template struct A {}; -/// struct B { B* next; }; +/// struct B { int next; }; +/// template struct A {}; /// A<&B::next> a; /// \endcode /// templateSpecializationType(hasAnyTemplateArgument( @@ -917,7 +917,7 @@ /// /// Given /// \code -/// template struct A {}; +/// template struct C {}; /// C<42> c; /// \endcode /// classTemplateSpecializationDecl( @@ -932,7 +932,7 @@ /// /// Given /// \code -/// template struct A {}; +/// template struct C {}; /// C<42> c; /// \endcode /// classTemplateSpecializationDecl( @@ -953,7 +953,7 @@ /// /// Given /// \code -/// template struct A {}; +/// template struct C {}; /// C<42> c; /// \endcode /// classTemplateSpecializationDecl( @@ -1523,12 +1523,12 @@ /// \code /// T u(f()); /// g(f()); -/// \endcode -/// but does not match -/// \code -/// f(); /// f().func(); /// \endcode +/// but does not match +/// \code +/// f(); +/// \endcode extern const internal::VariadicDynCastAllOfMatcher materializeTemporaryExpr; @@ -1789,7 +1789,7 @@ /// switch(a) { case 42: break; default: break; } /// \endcode /// switchStmt() -/// matches 'switch(a)'. +/// matches 'switch(a) {'. extern const internal::VariadicDynCastAllOfMatcher switchStmt; /// \brief Matches case and default statements inside switch statements. @@ -1799,7 +1799,7 @@ /// switch(a) { case 42: break; default: break; } /// \endcode /// switchCase() -/// matches 'case 42: break;' and 'default: break;'. +/// matches 'case 42:' and 'default:'. extern const internal::VariadicDynCastAllOfMatcher switchCase; /// \brief Matches case statements inside switch statements. @@ -1809,7 +1809,7 @@ /// switch(a) { case 42: break; default: break; } /// \endcode /// caseStmt() -/// matches 'case 42: break;'. +/// matches 'case 42:'. extern const internal::VariadicDynCastAllOfMatcher caseStmt; /// \brief Matches default statements inside switch statements. @@ -1819,13 +1819,13 @@ /// switch(a) { case 42: break; default: break; } /// \endcode /// defaultStmt() -/// matches 'default: break;'. +/// matches 'default:'. extern const internal::VariadicDynCastAllOfMatcher defaultStmt; /// \brief Matches compound statements. /// -/// Example matches '{}' and '{{}}'in 'for (;;) {{}}' +/// Example matches '{}' and '{{}}' in 'for (;;) {{}}' /// \code /// for (;;) {{}} /// \endcode @@ -1838,7 +1838,7 @@ /// try {} catch(int i) {} /// \endcode /// cxxCatchStmt() -/// matches 'catch(int i)' +/// matches 'catch(int i) {}' extern const internal::VariadicDynCastAllOfMatcher cxxCatchStmt; @@ -1848,7 +1848,7 @@ /// try {} catch(int i) {} /// \endcode /// cxxTryStmt() -/// matches 'try {}' +/// matches 'try {} catch(int i) {}' extern const internal::VariadicDynCastAllOfMatcher cxxTryStmt; /// \brief Matches throw expressions.