[PATCH] D65944: [clang] Update `ignoringElidableConstructorCall` matcher to ignore `ExprWithCleanups`.

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 8 08:49:12 PDT 2019


gribozavr accepted this revision.
gribozavr added inline comments.


================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6556
 ///
-/// ``varDecl(hasInitializer(any(
-///       ignoringElidableConstructorCall(callExpr()),
-///       exprWithCleanups(ignoringElidableConstructorCall(callExpr()))))``
-/// matches ``H D = G()``
+/// ``varDecl(hasInitializer(ignoringElidableConstructorCall(callExpr())))``
+/// matches ``H D = G()`` in C++11 through C++17 (and beyond).
----------------
ymandel wrote:
> gribozavr wrote:
> > Could you add this matcher as a test?
> Done
> 
> Also, I noticed that the matcher is classified as "Traversal" yet its tests are in ASTMatchersNarrowingTest.cpp.  Any objection to my moving the tests to ASTMatchersTraversalTest.cpp as a followup patch?
That would make a lot of sense, thank you!



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65944





More information about the cfe-commits mailing list