Add a new AST matcher 'optionally'.
authorRihan Yang <adam@air20.com>
Wed, 8 Jan 2020 19:09:29 +0000 (14:09 -0500)
committerAaron Ballman <aaron@aaronballman.com>
Wed, 8 Jan 2020 19:10:11 +0000 (14:10 -0500)
commit2823e91d55891e33a7a8b9a4016db4ec9e2765ae
tree3cff8a06b1f09001bd0c7d252e61307851e8d490
parentb675a7628ce6a21b1e4a71c079a67badfb8b073d
Add a new AST matcher 'optionally'.

This matcher matches any node and at the same time executes all its
inner matchers to produce any possbile result bindings.

This is useful when a user wants certain supplementary information
that's not always present along with the main match result.
clang/docs/LibASTMatchersReference.html
clang/include/clang/ASTMatchers/ASTMatchers.h
clang/include/clang/ASTMatchers/ASTMatchersInternal.h
clang/lib/ASTMatchers/ASTMatchersInternal.cpp
clang/lib/ASTMatchers/Dynamic/Registry.cpp
clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp