MaskRay updated this revision to Diff 130458.
MaskRay added a comment.
More
Repository:
rC Clang
https://reviews.llvm.org/D42213
Files:
include/clang/ASTMatchers/ASTMatchers.h
Index: include/clang/ASTMatchers/ASTMatchers.h
===================================================================
--- include/clang/ASTMatchers/ASTMatchers.h
+++ include/clang/ASTMatchers/ASTMatchers.h
@@ -800,7 +800,7 @@
/// A<bool, int> b;
/// A<int, bool> c;
///
-/// template<typename T> f() {};
+/// template<typename T> void f() {};
/// void func() { f<int>(); };
/// \endcode
/// classTemplateSpecializationDecl(hasTemplateArgument(
@@ -880,12 +880,12 @@
///
/// Given
/// \code
-/// template<typename T> struct A {};
-/// struct B { B* next; };
+/// struct B { int next; };
+/// template<int(B::*next_ptr)> 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<typename T> struct A {};
-/// struct B { B* next; };
+/// struct B { int next; };
+/// template<int(B::*next_ptr)> struct A {};
/// A<&B::next> a;
/// \endcode
/// templateSpecializationType(hasAnyTemplateArgument(
@@ -917,7 +917,7 @@
///
/// Given
/// \code
-/// template<int T> struct A {};
+/// template<int T> struct C {};
/// C<42> c;
/// \endcode
/// classTemplateSpecializationDecl(
@@ -932,7 +932,7 @@
///
/// Given
/// \code
-/// template<int T> struct A {};
+/// template<int T> struct C {};
/// C<42> c;
/// \endcode
/// classTemplateSpecializationDecl(
@@ -953,7 +953,7 @@
///
/// Given
/// \code
-/// template<int T> struct A {};
+/// template<int T> 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<Stmt,
MaterializeTemporaryExpr>
materializeTemporaryExpr;
Index: include/clang/ASTMatchers/ASTMatchers.h
===================================================================
--- include/clang/ASTMatchers/ASTMatchers.h
+++ include/clang/ASTMatchers/ASTMatchers.h
@@ -800,7 +800,7 @@
/// A<bool, int> b;
/// A<int, bool> c;
///
-/// template<typename T> f() {};
+/// template<typename T> void f() {};
/// void func() { f<int>(); };
/// \endcode
/// classTemplateSpecializationDecl(hasTemplateArgument(
@@ -880,12 +880,12 @@
///
/// Given
/// \code
-/// template<typename T> struct A {};
-/// struct B { B* next; };
+/// struct B { int next; };
+/// template<int(B::*next_ptr)> 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<typename T> struct A {};
-/// struct B { B* next; };
+/// struct B { int next; };
+/// template<int(B::*next_ptr)> struct A {};
/// A<&B::next> a;
/// \endcode
/// templateSpecializationType(hasAnyTemplateArgument(
@@ -917,7 +917,7 @@
///
/// Given
/// \code
-/// template<int T> struct A {};
+/// template<int T> struct C {};
/// C<42> c;
/// \endcode
/// classTemplateSpecializationDecl(
@@ -932,7 +932,7 @@
///
/// Given
/// \code
-/// template<int T> struct A {};
+/// template<int T> struct C {};
/// C<42> c;
/// \endcode
/// classTemplateSpecializationDecl(
@@ -953,7 +953,7 @@
///
/// Given
/// \code
-/// template<int T> struct A {};
+/// template<int T> 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<Stmt,
MaterializeTemporaryExpr>
materializeTemporaryExpr;
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits