steveire added inline comments.
================ Comment at: clang/lib/ASTMatchers/ASTMatchersInternal.cpp:402 ArrayRef<DynTypedMatcher> InnerMatchers) { + if (InnerMatchers.empty()) + return true; ---------------- aaron.ballman wrote: > Does it make sense to return `true` when there are no inner matchers? I would > have thought that that if there are no matchers, nothing would match (so we'd > return `false`)? When debugging a matcher like ``` callExpr(anyOf( hasType(pointerType()), callee(functionDecl(hasName("foo"))) )) ``` and commenting out inner matchers to get ``` callExpr(anyOf( # hasType(pointerType()), # callee(functionDecl(hasName("foo"))) )) ``` it would be very surprising for this to not match callExprs anymore. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94126/new/ https://reviews.llvm.org/D94126 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits