This revision was automatically updated to reflect the committed changes.
hokein marked an inline comment as done.
Closed by commit rCTE322067: [clangd] Catch more symbols in SymbolCollector.
(authored by hokein, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D41759?vs=129053
hokein updated this revision to Diff 129053.
hokein added a comment.
Add a comment for symbols in anonymous namespace.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D41759
Files:
clangd/index/SymbolCollector.cpp
unittests/clangd/SymbolCollectorTests.cpp
Index: unittests/c
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM (see the review comment about adding a comment in the code too)
Comment at: clangd/index/SymbolCollector.cpp:89
+// violations.
+if (ND->isInAnonym
hokein added inline comments.
Comment at: clangd/index/SymbolCollector.cpp:89
+// violations.
+if (ND->isInAnonymousNamespace())
return true;
ilya-biryukov wrote:
> Why don't we include symbols from anonymous namespaces too?
> They are very similar
ilya-biryukov added inline comments.
Comment at: clangd/index/SymbolCollector.cpp:89
+// violations.
+if (ND->isInAnonymousNamespace())
return true;
Why don't we include symbols from anonymous namespaces too?
They are very similar to static symbols
hokein created this revision.
hokein added a reviewer: ilya-biryukov.
Herald added a subscriber: klimek.
We currently only collect external-linkage symbols in the collector,
which results in missing some typical symbols (like no-linkage type alias
symbols).
This patch relaxes the constraint a bi