[PATCH] D82278: Fix traversal over CXXConstructExpr in Syntactic mode
Yitzhak Mandelbaum via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 29 08:27:51 PDT 2020
ymandel added inline comments.
================
Comment at: clang/lib/AST/Expr.cpp:2822
+ if (SE->getSourceRange() == E->getSourceRange())
+ return Cast->getSubExpr();
+ }
----------------
nit: just `return SE`?
================
Comment at: clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp:1236
EXPECT_TRUE(matches(foo_class + "void r() { Foo f = Foo(\"hello world\"); }",
- cxxFunctionalCastExpr()));
+ traverse(TK_AsIs, cxxFunctionalCastExpr())));
}
----------------
is this necessary/desirable given that we reverted the default behavior? if so, should we update other tests (at least, others involving this matcher) as well?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82278/new/
https://reviews.llvm.org/D82278
More information about the cfe-commits
mailing list