]> granicus.if.org Git - clang/commit
[ASTMatchers] Add support for matching the type of a friend decl.
authorDavid L. Jones <dlj@google.com>
Mon, 18 Jun 2018 09:23:08 +0000 (09:23 +0000)
committerDavid L. Jones <dlj@google.com>
Mon, 18 Jun 2018 09:23:08 +0000 (09:23 +0000)
commit07caa7f2a1dae8d2569ec59a2f6785ad5d4ea3d9
tree96edd31612236d895953a701c028f6264272f408
parent8186139d6aa0619e2057ae617c074e486a7b2f2b
[ASTMatchers] Add support for matching the type of a friend decl.

This allows matchers like:

  friendDecl(hasType(cxxRecordDecl(...)))
  friendDecl(hasType(asString(...)))

It seems that hasType is probably the most reasonable narrowing matcher to
overload, since it is already used to narrow to other declaration kinds.

Differential Revision: https://reviews.llvm.org/D48242

Reviewers: klimek, aaron.ballman

Subscribers: cfe-commits

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334930 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/ASTMatchers/ASTMatchers.h
include/clang/ASTMatchers/ASTMatchersInternal.h
unittests/ASTMatchers/ASTMatchersNodeTest.cpp