This is an archive of the discontinued LLVM Phabricator instance.

Make RecursiveASTVisitor call WalkUpFrom for unary and binary operators in post-order traversal mode
ClosedPublic

Authored by gribozavr on Jun 29 2020, 9:43 AM.

Diff Detail

Event Timeline

gribozavr created this revision.Jun 29 2020, 9:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2020, 9:43 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
rsmith accepted this revision.Jun 29 2020, 2:39 PM
This revision is now accepted and ready to land.Jun 29 2020, 2:39 PM
gribozavr updated this revision to Diff 274495.Jun 30 2020, 8:25 AM

Rebased the patch.

gribozavr updated this revision to Diff 274497.Jun 30 2020, 8:31 AM

Rebased the patch.

eduucaldas added inline comments.Jun 30 2020, 10:40 PM
clang/include/clang/AST/RecursiveASTVisitor.h
649

There's only one place that call PostVisitStmt. Could we pull this conditional there? It is repeated in every macro. It would make this function much simpler, and make clear at call site what is being done

gribozavr2 marked an inline comment as done.Jul 1 2020, 4:13 AM
gribozavr2 added a subscriber: gribozavr2.
gribozavr2 added inline comments.
clang/include/clang/AST/RecursiveASTVisitor.h
649

Unfortunately, we can't, because every call to isSameMethod has different arguments.

eduucaldas accepted this revision.Jul 1 2020, 4:42 AM
This revision was automatically updated to reflect the committed changes.