================
@@ -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) {
----------------
HighCommander4 wrote:

Just to make sure I'm following this: in the 
`istemplateImplicitInstantiation(D) && !IsRef` case, we used to early-return 
but now we fall through to calling `DataConsumer.handleDeclOccurrence()`, right?

Should that be guared by `shouldIndexImplicitInstantiation()`? Or is the idea 
that the check of `shouldIndexImplicitInstantiation()` in 
`IndexingDeclVisitor::VisitTemplateDecl()` should ensure we don't get here in 
the first place?

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