================
@@ -576,6 +576,50 @@ SymbolCollector::getRefContainer(const Decl *Enclosing,
return Enclosing;
}
+bool SymbolCollector::isLikelyForwardingFunctionCached(
+ const FunctionTemplateDecl *FT) {
+ if (LikelyForwardingFunctionCached.contains(FT))
+ return true;
+ if (isLikelyForwardingFunction(FT)) {
+ LikelyForwardingFunctionCached.insert(FT);
+ return true;
+ }
+ return false;
+}
+
+bool SymbolCollector::potentiallyForwardInBody(const Decl *D) {
+ if (auto *FD = llvm::dyn_cast<clang::FunctionDecl>(D);
----------------
HighCommander4 wrote:
This first part of the function, which pertains to function template
instantiations, can be dropped, as it's not applicable.
(The optimization we're trying to avoid is to skip **parsing** function bodies.
Function template instantiations' bodies aren't parsed, they're synthesized
from the primary template's body, so we should never get here for them.)
https://github.com/llvm/llvm-project/pull/169742
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits