[clangd] IncludeCleaner: don't stop the traversal
authorKirill Bobyrev <kbobyrev@google.com>
Tue, 26 Oct 2021 14:08:54 +0000 (16:08 +0200)
committerKirill Bobyrev <kbobyrev@google.com>
Tue, 26 Oct 2021 14:08:54 +0000 (16:08 +0200)
commit1c2e249f938c50e1b331a1f7adc83c0a381f3897
treebaf6ebf6338b2df07f947e83d6c299b5c77f7c67
parenteb16570ab004ba2b9fa8b12ccc8cc12690ebe242
[clangd] IncludeCleaner: don't stop the traversal

I was under the impression that `return false;` in the
RecursiveASTVisitor stops the traversal for the subtree but it appears
that it stops the whole tree traversal, so this change introduces a bug
where `ReferencedLocationCrawler` will not collect any symbols past an
enum.

This is a follow-up on D112209.
clang-tools-extra/clangd/IncludeCleaner.cpp