[PATCH] D94753: [clangd] exclude symbols from document outline which do not originate from the main file

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 15 01:16:08 PST 2021


kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.

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



================
Comment at: clang-tools-extra/clangd/unittests/FindSymbolsTests.cpp:532
 
 TEST(DocumentSymbols, InHeaderFile) {
   TestTU TU;
----------------
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() {}
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94753/new/

https://reviews.llvm.org/D94753



More information about the cfe-commits mailing list