[PATCH] D56090: Add a matcher for members of an initializer list expression

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 31 07:12:17 PST 2018


aaron.ballman requested changes to this revision.
aaron.ballman added a comment.
This revision now requires changes to proceed.

In D56090#1341023 <https://reviews.llvm.org/D56090#1341023>, @hwright wrote:

> @lebedev.ri Where do the appropriate tests live?  (I couldn't find an obvious subdirectory in `test/`)


This would live in `clang\unittests\ASTMatchers\ASTMatchersNarrowingTest.cpp`

> Where are the instructions for regenerating the documentation?

Run `clang\docs\tools\dump_ast_matchers.py` and it will generate the documentation for you.

You should also update Registry.cpp to list the new matcher.



================
Comment at: include/clang/ASTMatchers/ASTMatchers.h:3527
+  return N < Node.getNumInits() &&
+          InnerMatcher.matches(*Node.getInit(N)->IgnoreParenImpCasts(), Finder,
+                               Builder);
----------------
I'm not certain we want the `IgnoreParenImpCasts()` here -- what if someone wants to match an initializer that uses one of those properties?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56090/new/

https://reviews.llvm.org/D56090





More information about the cfe-commits mailing list