================
@@ -402,9 +402,7 @@ bool IndexingContext::handleDeclOccurrence(const Decl *D, 
SourceLocation Loc,
   if (!OrigD)
     OrigD = D;
 
-  if (isTemplateImplicitInstantiation(D)) {
-    if (!IsRef)
-      return true;
+  if (isTemplateImplicitInstantiation(D) && IsRef) {
----------------
timon-ul wrote:

Yes we want to fall through, basically before this would make it so we cannot 
index implicit instantiations due to an early return. You are right though that 
this is (probably) not correct behaviour as of now as far as I can tell. The 
problem is that this function has the worst name ever, because it does not 
check for implicit instantiations, but also for explicit ones. I am not even 
sure in which way we want to handle explicit instantiations as of now, but the 
least invasive thing would be to return to the original code but replace the 
"implicit" check with an "only explicit" check, will think a bit about this.

https://github.com/llvm/llvm-project/pull/177273
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to