This is an archive of the discontinued LLVM Phabricator instance.

[clangd] exclude symbols from document outline which do not originate from the main file
ClosedPublic

Authored by ilya-golovenko on Jan 14 2021, 11:47 PM.

Diff Detail

Event Timeline

ilya-golovenko requested review of this revision.Jan 14 2021, 11:47 PM
kadircet accepted this revision.Jan 15 2021, 1:16 AM

thanks for the fix, a small comment about testing though.

clang-tools-extra/clangd/unittests/FindSymbolsTests.cpp
532

we already have a test case for this but it was passing erroneously, as the include was part of the preamble and never subject to documentoutline traversal.

can you rather update this test to look like:

int DeclarationToFinishPreamble;
#inclube "bar.h"
int test() {}
This revision is now accepted and ready to land.Jan 15 2021, 1:16 AM

Update existing test and remove redundant one

@kadircet Thank you for review!

btw, do you have commit access or should i land this for you ? (if so please provide your email)

btw, do you have commit access or should i land this for you ? (if so please provide your email)

I've got commit access some time ago. Thanks again!