JonasToth added inline comments.
================ Comment at: clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp:158 + *Result.Context) + .empty()) { + diag(ArgExpr->getBeginLoc(), Message); ---------------- astrelni wrote: > JonasToth wrote: > > You could ellide these braces, but I feel that this matching code be merged > > into one matcher with `equalsBoundNode()` (see ASTMatcher reference). > Started with removing braces. > > Sorry I had a look at `equalsBoundNode()`, but couldn't see exactly what you > meant. Could you please elaborate about the merging? i do not use that matcher on a daily basis, so take it with a grain of salt, please :) prototype: ``` match(unless(allOf(isInTemplateInstantiation(equalsBoundNode("arg"))), expr(isInstantiationOfDependentExpr(equalsBoundNode("call"))))) ``` You could do that matching in the `registerMatchers` even. The `equalsBoundNode` is suitable to connect different parts of a complexer matcher. If you want, you can explore it. Slight simplification would be desirable here, but if it's not feasable the current form works too. https://reviews.llvm.org/D53830 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits