[PATCH] D65092: [clang] Add isDirectlyDerivedFrom AST Matcher.

Anton Bikineev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 24 07:58:45 PDT 2019


AntonBikineev added inline comments.


================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:2672
+                       BaseName, 1) {
+  assert(!BaseName.empty());
+  return isDirectlyDerivedFrom(hasName(BaseName))
----------------
aaron.ballman wrote:
> I don't think this assertion is reasonable -- we should instead test this as a predicate and return false if the base name is empty.
It's done in the same way as for existing isDerivedFrom and isSameOrDerived>From matchers. Maybe it would make sense to change all of them, but I guess it should rather be a separate commit.


Repository:
  rC Clang

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

https://reviews.llvm.org/D65092





More information about the cfe-commits mailing list