[PATCH] D69961: [clangd] Fix a regression of not showing documentation from forward declarations.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 8 00:49:13 PST 2019


ilya-biryukov added inline comments.


================
Comment at: clang-tools-extra/clangd/index/Merge.cpp:195
+    bool IsClass = S.SymInfo.Kind == index::SymbolKind::Class ||
+                   S.SymInfo.Kind == index::SymbolKind::Struct;
+    if (!IsClass || !S.Definition)
----------------
NIT: `|| Kind == Union`
I guess it's not very common, though


================
Comment at: clang-tools-extra/clangd/unittests/IndexTests.cpp:414
   L.Definition.FileURI = "file:/x.h";
+  L.SymInfo.Kind = index::SymbolKind::Class;
   R.Documentation = "Forward declarations because x.h is too big to include";
----------------
Could you add a similar test with a non-class symbol that checks the documentation is still there?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69961





More information about the cfe-commits mailing list