From ed455d4062f1a47cd7f060989f85010c967595e5 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 11 Aug 2015 20:42:00 +0000 Subject: Add an AST matcher to match member intializers of a CXXCtorInitializer. llvm-svn: 244662 --- clang/docs/LibASTMatchersReference.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'clang/docs/LibASTMatchersReference.html') diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html index 4d383817b33..799b47af6fd 100644 --- a/clang/docs/LibASTMatchersReference.html +++ b/clang/docs/LibASTMatchersReference.html @@ -1512,6 +1512,23 @@ constructorDecl(hasAnyConstructorInitializer(isBaseInitializer())) +Matcher<CXXCtorInitializer>isMemberInitializer +
Matches a constructor initializer if it is initializing a direct member, as opposed to a base.
+
+Given
+  struct B {};
+  struct D : B {
+    int I;
+    D(int i) : I(i) {}
+  };
+  struct E : B {
+    E() : B() {}
+  };
+constructorDecl(hasAnyConstructorInitializer(isMemberInitializer()))
+  will match D(int), but not match E().
+
+ + Matcher<CXXCtorInitializer>isWritten
Matches a constructor initializer if it is explicitly written in
 code (as opposed to implicitly added by the compiler).
-- 
cgit v1.2.3