]> granicus.if.org Git - clang/commit
[AST] Treat semantic form of InitListExpr as implicit code in traversals
authorIlya Biryukov <ibiryukov@google.com>
Mon, 22 Jul 2019 09:58:53 +0000 (09:58 +0000)
committerIlya Biryukov <ibiryukov@google.com>
Mon, 22 Jul 2019 09:58:53 +0000 (09:58 +0000)
commitaebe7c421069cfbd51fded0d29ea3c9c50a4dc91
tree36bdb575bfa5733ac2ee28d11a5b15324a709339
parentd3067677be31c9c8aff122a797b0eca41a14a18f
[AST] Treat semantic form of InitListExpr as implicit code in traversals

Summary:
In particular, do not traverse the semantic form if shouldVisitImplicitCode()
returns false.

This simplifies the common case of traversals, avoiding the need to
worry about some expressions being traversed twice.

No tests break after the change, the change would allow to simplify at
least one of the usages, i.e. r366070 which had to handle this in
clangd.

Reviewers: gribozavr

Reviewed By: gribozavr

Subscribers: kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64762

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366672 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/RecursiveASTVisitor.h
unittests/Tooling/RecursiveASTVisitorTests/InitListExprPreOrder.cpp