[PATCH] D94786: [clang][ASTImporter] Add support for importing CXXFoldExpr.

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 21 23:55:01 PST 2021


balazske added inline comments.


================
Comment at: clang/unittests/AST/ASTImporterTest.cpp:642-649
+const internal::VariadicDynCastAllOfMatcher<Stmt, CXXFoldExpr> cxxFoldExpr;
+
+AST_MATCHER_P(CXXFoldExpr, hasOperator, BinaryOperatorKind, Op) {
+  return Node.getOperator() == Op;
+}
+AST_MATCHER(CXXFoldExpr, hasInit) { return Node.getInit(); }
+AST_MATCHER(CXXFoldExpr, isRightFold) { return Node.isRightFold(); }
----------------
balazske wrote:
> martong wrote:
> > Perhaps we could add this directly to ASTMatchers.h ?
> It would make sense, `CXXFoldExpr` could be needed by other users.
But I plan to commit this as is, there are other matchers in this file that could be put into **ASTMatchers.h**, it should be checked why these are not there and which ones to put into the header.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94786



More information about the cfe-commits mailing list