kadircet created this revision.
Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, 
ilya-biryukov.
Herald added a project: clang.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78359

Files:
  clang-tools-extra/clangd/index/SymbolCollector.cpp


Index: clang-tools-extra/clangd/index/SymbolCollector.cpp
===================================================================
--- clang-tools-extra/clangd/index/SymbolCollector.cpp
+++ clang-tools-extra/clangd/index/SymbolCollector.cpp
@@ -469,7 +469,10 @@
     if (!ObjectID)
       continue;
 
-    // Record the relation.
+    // In a BaseOf relation we must've seen the definition/declaration of base
+    // type.
+    if (!Symbols.find(ID))
+      continue;
     // TODO: There may be cases where the object decl is not indexed for some
     // reason. Those cases should probably be removed in due course, but for
     // now there are two possible ways to handle it:


Index: clang-tools-extra/clangd/index/SymbolCollector.cpp
===================================================================
--- clang-tools-extra/clangd/index/SymbolCollector.cpp
+++ clang-tools-extra/clangd/index/SymbolCollector.cpp
@@ -469,7 +469,10 @@
     if (!ObjectID)
       continue;
 
-    // Record the relation.
+    // In a BaseOf relation we must've seen the definition/declaration of base
+    // type.
+    if (!Symbols.find(ID))
+      continue;
     // TODO: There may be cases where the object decl is not indexed for some
     // reason. Those cases should probably be removed in due course, but for
     // now there are two possible ways to handle it:
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D78359: [clangd] D... Kadir Cetinkaya via Phabricator via cfe-commits

Reply via email to