[PATCH] D64634: [clangd] Fix duplicate highlighting tokens appearing in initializer lists
Johan Vikström via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 15 07:15:25 PDT 2019
jvikstrom added a comment.
In D64634#1585521 <https://reviews.llvm.org/D64634#1585521>, @ilya-biryukov wrote:
> Have we tried figuring out why `RecursiveASTVisitor` visits the argument lists twice? Is that an expected behavior?
The comment for the function that traverses initialization lists says this:
> // This method is called once for each pair of syntactic and semantic
> // InitListExpr, and it traverses the subtrees defined by the two forms. This
> // may cause some of the children to be visited twice, if they appear both in
> // the syntactic and the semantic form.
So it seems to be expected. (and looking at the documentation for InitListExpr it seems to be difficult to change RecursiveASTVisitor to visit every sub expr once)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64634/new/
https://reviews.llvm.org/D64634
More information about the cfe-commits
mailing list