[PATCH] D55044: [clang-tidy] check for Abseil make_unique

Andy Zhang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 1 19:45:51 PDT 2019


axzhang marked 2 inline comments as done and an inline comment as not done.
axzhang added inline comments.


================
Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:94
                                          equalsBoundNode(PointerType))))),
                                      CanCallCtor)
                               .bind(NewExpression)),
----------------
axzhang wrote:
> lebedev.ri wrote:
> > ```
> > CanCallCtor, anyOf(unless(IgnoreListInit), unless(hasInitializationStyle(CXXNewExpr::ListInit))))
> > ```
> I can't compile `unless(IgnoreListInit)`, but `unless(IgnoreListInit ? unless(anything()) : anything())` does work. I'm not sure how idiomatic that is though.
Actually, `unless(anything())` also does not compile. How should I make a matcher that won't trigger if `IgnoreListInit` is true?


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

https://reviews.llvm.org/D55044





More information about the cfe-commits mailing list