[PATCH] D94786: [clang][ASTImporter] Add support for importing CXXFoldExpr.
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 19 06:42:22 PST 2021
martong accepted this revision.
martong added a comment.
This revision is now accepted and ready to land.
Looks good to me! Thanks!
================
Comment at: clang/lib/AST/ASTImporter.cpp:8019
+ auto ToType = importChecked(Err, E->getType());
+ auto ToCallee = importChecked(Err, E->getCallee());
+ auto ToLParenLoc = importChecked(Err, E->getLParenLoc());
----------------
Could you please address the Lint messages? Making it `auto *` has sense.
================
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(); }
----------------
Perhaps we could add this directly to ASTMatchers.h ?
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