[PATCH] D42074: [clangd] Collect enum constants in SymbolCollector

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 18 02:03:10 PST 2018

hokein added inline comments.

Comment at: clangd/index/SymbolCollector.cpp:75
+  // Skip nameless declarations.
+  if (ND->getDeclName().isEmpty())
+    return true;
ilya-biryukov wrote:
> What are those declarations exactly?
This would  ignore anonymous declarations, e.g. anonymous class/enum. See the unittest.

Comment at: unittests/clangd/SymbolCollectorTests.cpp:174
+    enum class Color2 {
+      Yellow
+    };
ilya-biryukov wrote:
> I'd say we should drop `enum` constants inside stongly-typed enums (i.e. `enum class`).
> They can't be found inside namespace by code completion, therefore being similar to static method in that regard. (And we don't include static methods now, right?)
yeah, that makes sense. 

  rCTE Clang Tools Extra


More information about the cfe-commits mailing list