summaryrefslogtreecommitdiffstats
path: root/include/clang/ASTMatchers
diff options
context:
space:
mode:
authorMalcolm Parsons <malcolm.parsons@gmail.com>2017-08-01 09:53:55 +0000
committerMalcolm Parsons <malcolm.parsons@gmail.com>2017-08-01 09:53:55 +0000
commit16a0981eccf1bfcc9ba928747aa825e8948791cd (patch)
treedf7485cc66eddebf9fdaf1438f6183d664dd3514 /include/clang/ASTMatchers
parent6660f0d30ef23b3142a6b08f9f41aad3d47c084f (diff)
[ASTMatchers] Allow forField to match indirect fields.
This is needed for PR32966. Reviewed by alexfh. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309667 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/ASTMatchers')
-rw-r--r--include/clang/ASTMatchers/ASTMatchers.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/clang/ASTMatchers/ASTMatchers.h b/include/clang/ASTMatchers/ASTMatchers.h
index c9b496df33..a4fc6faa66 100644
--- a/include/clang/ASTMatchers/ASTMatchers.h
+++ b/include/clang/ASTMatchers/ASTMatchers.h
@@ -3237,7 +3237,7 @@ AST_MATCHER_P(CXXConstructorDecl, hasAnyConstructorInitializer,
/// with forField matching foo_
AST_MATCHER_P(CXXCtorInitializer, forField,
internal::Matcher<FieldDecl>, InnerMatcher) {
- const FieldDecl *NodeAsDecl = Node.getMember();
+ const FieldDecl *NodeAsDecl = Node.getAnyMember();
return (NodeAsDecl != nullptr &&
InnerMatcher.matches(*NodeAsDecl, Finder, Builder));
}