================
@@ -666,9 +689,19 @@ bool SymbolCollector::handleDeclOccurrence(
auto FileLoc = SM.getFileLoc(Loc);
auto FID = SM.getFileID(FileLoc);
if (Opts.RefsInHeaders || FID == SM.getMainFileID()) {
+ auto *Container = getRefContainer(ASTNode.Parent, Opts);
addRef(ID, SymbolRef{FileLoc, FID, Roles, index::getSymbolInfo(ND).Kind,
- getRefContainer(ASTNode.Parent, Opts),
- isSpelled(FileLoc, *ND)});
+ Container, isSpelled(FileLoc, *ND)});
+ // Also collect indirect constructor calls like `make_unique`
+ for (auto *Constructor : findIndirectConstructors(ASTNode.OrigD)) {
+ if (!shouldCollectSymbol(*Constructor, *ASTCtx, Opts, IsMainFileOnly))
----------------
HighCommander4 wrote:
The `IsMainFileOnly` argument needs to be computed for the constructor. See how
it's computed for `ND` above; feel free to extract a lambda or something to
reuse the code.
https://github.com/llvm/llvm-project/pull/169742
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits