[PATCH] D65944: [clang] Update `ignoringElidableConstructorCall` matcher to ignore `ExprWithCleanups`.
Yitzhak Mandelbaum via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 8 08:17:31 PDT 2019
ymandel marked 4 inline comments as done.
ymandel added a comment.
Thanks for the comments. I struggled with the wording so your edits are appreciated.
================
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).
----------------
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?
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