================
@@ -230,6 +242,9 @@ class SymbolCollector : public index::IndexDataConsumer {
   std::unique_ptr<HeaderFileURICache> HeaderFileURIs;
   llvm::DenseMap<const Decl *, SymbolID> DeclToIDCache;
   llvm::DenseMap<const MacroInfo *, SymbolID> MacroToIDCache;
+  llvm::DenseSet<const FunctionTemplateDecl *> LikelyForwardingFunctionCached;
----------------
timon-ul wrote:

Honestly I wasn't sure myself how useful it is and I just put it in with the 
expectation that we might drop it again. The idea is that for every template we 
call the function `isLikelyForwardingFunction` once to see if we need its body, 
so far so good, but then we need to call it twice for every instantiation, once 
to even index the body and once to then search for constructors later. This 
means a template with only 2 instantiations will already have 5 calls to 
`isLikelyForwardingFunction` on the same template, whereas this cache would get 
it to 1. But as you pointed out the negative case is not caught and caching 
that seems unrealistic.

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

Reply via email to